From 07db158656c0d7f710c7bab970d1b36f74fd2b30 Mon Sep 17 00:00:00 2001 From: dekun Date: Sun, 4 Oct 2026 07:15:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E5=B8=81=E6=9C=AC=E4=BD=8D?= =?UTF-8?q?=E3=80=8C=E9=87=8D=E8=AF=95=E5=8D=96=E5=9B=9E=E3=80=8D=E5=B8=B8?= =?UTF-8?q?=E6=98=BE=EF=BC=8C=E5=B8=A6=E9=B1=BC=E5=B1=8F=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E5=8C=BA=E6=94=B9=E5=9B=9E=201800=20=E5=B1=85=E4=B8=AD?= =?UTF-8?q?=E7=95=99=E7=99=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- lib/common/static/instance_page.css | 20 ++++++++------------ lib/common/static/options_panel.js | 15 +++++++-------- lib/instance/templates/embed_shell.html | 2 +- lib/instance/templates/index.html | 2 +- lib/options/templates/options_panel.html | 2 +- 5 files changed, 18 insertions(+), 23 deletions(-) diff --git a/lib/common/static/instance_page.css b/lib/common/static/instance_page.css index 0b4f628..8ecde14 100644 --- a/lib/common/static/instance_page.css +++ b/lib/common/static/instance_page.css @@ -4,13 +4,12 @@ .order-entry-model-row select.order-entry-model-sub{min-width:7em;max-width:10rem} .order-leverage-hint{font-size:.78rem;color:#cfd3ef;white-space:nowrap;align-self:center} body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:#0b0d14;color:#eaeaea;padding:14px 12px} - /* 1920 左右用满:约 96vw / 1840,两侧留白更小 */ - .container{width:100%;max-width:min(1840px,96vw);margin:0 auto;padding:0 clamp(6px,1vw,14px)} - /* 中控工作台内嵌:铺满 iframe,不受带鱼屏 1920 居中限制 */ + /* 内容区锁定 1800,超宽两侧留白 */ + .container{width:100%;max-width:min(1800px,96vw);margin:0 auto;padding:0 clamp(6px,1vw,14px)} body[data-embed-shell="1"] .container{ - max-width:none; + max-width:min(1800px,96vw); width:100%; - margin:0; + margin:0 auto; padding:0 clamp(6px,1vw,14px); } .header{display:flex;flex-direction:column;align-items:center;gap:8px;margin-bottom:12px} @@ -175,18 +174,15 @@ .panel-scroll,.pos-list{max-height:420px} .records-card .table-wrap{max-height:620px;overflow:auto} } - /* 带鱼屏(宽高比≥21:9):独立打开时固定 1920 居中;中控内嵌仍全宽 */ + /* 带鱼屏(宽高比≥21:9):锁定 1800 居中,两侧留白 */ @media (min-aspect-ratio: 21/9) { - .container{ + .container, + body[data-embed-shell="1"] .container{ width:100%; - max-width:min(1920px, calc(100vw - 24px)); + max-width:min(1800px, calc(100vw - 24px)); margin-left:auto; margin-right:auto; } - body[data-embed-shell="1"] .container{ - max-width:none; - margin:0; - } } @media (min-width: 2560px){ .dual-panel-grid{gap:18px} diff --git a/lib/common/static/options_panel.js b/lib/common/static/options_panel.js index b710246..15bfafa 100644 --- a/lib/common/static/options_panel.js +++ b/lib/common/static/options_panel.js @@ -2258,15 +2258,14 @@ } function shouldShowSpotSellBanner(d, positions) { - if (!isCoinMarginMode()) return false; - const ss = d && d.spot_sell; - if (!ss) return false; + // 币本位下始终露出「重试卖回」(含有仓):便于清交易户残留,文案随选中/残留标的变化 const hasCoinPos = (positions || []).some(function (p) { return isCoinPos(p); }); - if (hasCoinPos) return false; - if (ss.bridge_status === "pending_sell_spot") return true; - const eth = Number(ss.trading_eth || 0); - const btc = Number(ss.trading_btc || 0); - return eth > 1e-12 || btc > 1e-12; + const coinMode = + isCoinMarginMode() || + hasCoinPos || + (d && d.options_margin_mode === "coin") || + !!(d && d.spot_sell); + return !!coinMode; } function spotSellUnderlying(ss) { diff --git a/lib/instance/templates/embed_shell.html b/lib/instance/templates/embed_shell.html index a75f619..7b53101 100644 --- a/lib/instance/templates/embed_shell.html +++ b/lib/instance/templates/embed_shell.html @@ -8,7 +8,7 @@ - + diff --git a/lib/instance/templates/index.html b/lib/instance/templates/index.html index df35108..6812a4d 100644 --- a/lib/instance/templates/index.html +++ b/lib/instance/templates/index.html @@ -18,7 +18,7 @@ {{ pwa_app_name }} - + diff --git a/lib/options/templates/options_panel.html b/lib/options/templates/options_panel.html index da7bbf6..75df920 100644 --- a/lib/options/templates/options_panel.html +++ b/lib/options/templates/options_panel.html @@ -356,4 +356,4 @@ - +