From e18dd41c2d37f85e0e8344aae1813a4929532210 Mon Sep 17 00:00:00 2001 From: dekun Date: Mon, 5 Oct 2026 06:47:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=80=BB=E8=A7=88=E6=8C=81=E4=BB=93=E5=88=97?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E6=9C=9F=E6=9D=83=E6=9D=A0=E6=9D=86=E5=80=8D?= =?UTF-8?q?=E6=95=B0=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 | 9 ++++++++- templates/dashboard.html | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/static/hub.js b/static/hub.js index 62fd580..b0ca8ed 100644 --- a/static/hub.js +++ b/static/hub.js @@ -112,13 +112,20 @@ const items = list.slice(0, 8).map(function (p) { const id = p.inst_id || ""; const sheets = escapeHtml(String(p.sheets != null ? p.sheets : "—")); + const lev = Number(p.contract_leverage != null ? p.contract_leverage : p.leverage); + const levTxt = + Number.isFinite(lev) && lev > 0 + ? " · 约" + lev.toFixed(1) + "×" + : ""; const fromCond = tagOpen && (!opened || opened === id); return ( "
  • " + escapeHtml(id) + " · " + sheets + - "张 · " + + "张" + + escapeHtml(levTxt) + + " · " + fmtPnlHtml(p.pnl_usdt) + (fromCond ? '条件单' : "") + "
  • " diff --git a/templates/dashboard.html b/templates/dashboard.html index ecb4c21..b035552 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -15,6 +15,6 @@
    {% endblock %} {% block scripts %} - + {% endblock %}