From d9bf3f79151f749509639ed607684afdeed0fad9 Mon Sep 17 00:00:00 2001 From: dekun Date: Sun, 4 Oct 2026 09:59:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E6=97=B6=E6=B1=87=E6=80=BB=E6=8C=89?= =?UTF-8?q?=E5=AE=9E=E9=99=85=E5=AE=9E=E4=BE=8B=E6=A8=A1=E5=BC=8F=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=EF=BC=9A=E4=BB=85=E6=9C=89=20sim=20=E6=88=96=20live?= =?UTF-8?q?=20=E6=97=B6=E5=8F=AA=E6=98=BE=E7=A4=BA=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E8=A1=8C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- static/hub.js | 11 +++++++++-- templates/dashboard.html | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/static/hub.js b/static/hub.js index 55bcde9..0e1642e 100644 --- a/static/hub.js +++ b/static/hub.js @@ -452,6 +452,14 @@ "" ); } + const rows = []; + if (s.sim.machines > 0) rows.push(modeRow("sim", "sim", s.sim)); + if (s.live.machines > 0) rows.push(modeRow("live", "live", s.live)); + if (!rows.length) { + box.hidden = true; + box.innerHTML = ""; + return; + } box.hidden = false; box.innerHTML = '
' + @@ -460,8 +468,7 @@ "" + "模式在线离线仓位浮盈权利金余额" + "" + - modeRow("sim", "sim", s.sim) + - modeRow("live", "live", s.live) + + rows.join("") + "
"; } diff --git a/templates/dashboard.html b/templates/dashboard.html index f1e1c2c..d9bb543 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -15,6 +15,6 @@
{% endblock %} {% block scripts %} - + {% endblock %}