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 @@ - +