diff --git a/docs/更新文档.md b/docs/更新文档.md index 5c6f9f4..f5cb508 100644 --- a/docs/更新文档.md +++ b/docs/更新文档.md @@ -4,6 +4,31 @@ --- +## 2026-07-16 · 平板监控卡片内容裁切修复 + +### 修改原因 + +平板一屏适配用 `overflow:hidden` + 均分 `1fr/1fr` 行高,把永续/期权/分所卡片内容裁掉,表格与余额显示不全。 + +### 修改的地方 + +| 文件 | 改动摘要 | +|------|----------| +| `manual_trading_hub/static/app.css` | `hub-tablet` 下取消强裁切:卡片/内卡 `overflow:visible`,行高改 `auto`,允许整页滚动;恢复可读字号;去掉过度压缩的平板加密度块 | +| `manual_trading_hub/static/index.html` | CSS 缓存 `20260716-hub-tablet-noclip` | + +### 达成的目标 + +平板上监控区/资金卡片内容完整可见;空间不够时整页可滚,不再把字和表格裁没。 + +### 交付之后的验收 + +1. 平板强制刷新后,OKX 永续+期权、Binance/Gate 卡片余额与持仓表完整可见。 +2. 期权表列(合约/张数/盈亏等)不被裁切。 +3. 桌面 1920×1080 一屏规则仍可用(无 `hub-tablet` 时)。 + +--- + ## 2026-07-16 · 中控平板一屏适配(2560×1600) ### 修改原因 diff --git a/manual_trading_hub/static/app.css b/manual_trading_hub/static/app.css index d544908..955a221 100644 --- a/manual_trading_hub/static/app.css +++ b/manual_trading_hub/static/app.css @@ -10089,109 +10089,192 @@ html[data-theme="light"] .hub-logs-card-hint { } } -/* ── 平板加密度(CSS 视口偏矮/偏窄,如 1280×800) ── */ -@media (min-width: 721px) and (min-height: 650px) and (max-height: 920px), - (min-width: 721px) and (max-width: 1400px) and (min-height: 650px) { - body.hub-page-monitor:not(.hub-phone) .app-shell, - body.hub-page-market:not(.hub-phone) .app-shell, - body.hub-page-funds:not(.hub-phone) .app-shell { - max-width: min(1600px, calc(100vw - 16px)); - padding-left: 12px; - padding-right: 12px; - padding-bottom: 4px; - } - - body.hub-page-monitor:not(.hub-phone) .app-header, - body.hub-page-market:not(.hub-phone) .app-header, - body.hub-page-funds:not(.hub-phone) .app-header { - padding: 6px 0 4px; - } - - body.hub-page-monitor:not(.hub-phone) #page-monitor > .page-head, - body.hub-page-market:not(.hub-phone) #page-market > .page-head { - margin: 2px 0 2px; - } - - body.hub-page-monitor:not(.hub-phone) #page-monitor > .page-head h1, - body.hub-page-market:not(.hub-phone) #page-market > .page-head h1, - body.hub-page-funds:not(.hub-phone) .funds-head h1 { - font-size: 14px; - } - - body.hub-page-monitor:not(.hub-phone) #page-monitor .host-status-panel, - body.hub-page-monitor:not(.hub-phone) #page-monitor .hub-m-fold { - margin-bottom: 4px; - } - - body.hub-page-monitor:not(.hub-phone) .grid-monitor-options-split .monitor-stats-card { - padding: 3px 8px; - } - - body.hub-page-monitor:not(.hub-phone) .grid-monitor-options-split .monitor-stat-value { - font-size: 12px; - } - - body.hub-page-monitor:not(.hub-phone) .card-monitor-okx-split .card-head, - body.hub-page-monitor:not(.hub-phone) .card-monitor-split-side .card-head { - padding: 4px 8px; - } - - body.hub-page-monitor:not(.hub-phone) .card-monitor-okx-split .card-body, - body.hub-page-monitor:not(.hub-phone) .card-monitor-split-side .card-body { - padding: 5px 8px; - } - - body.hub-page-monitor:not(.hub-phone) .hub-inner-card-head { - padding: 3px 6px; - } - - body.hub-page-monitor:not(.hub-phone) .hub-inner-card-body { - padding: 4px 6px; - } - - body.hub-page-monitor:not(.hub-phone) .data-table th, - body.hub-page-monitor:not(.hub-phone) .data-table td { - padding: 2px 4px; - font-size: 10px; - } - - body.hub-page-market:not(.hub-phone) #page-market .market-ohlcv-bar { - padding: 4px 8px; - } - - body.hub-page-market:not(.hub-phone) #page-market .market-ohlcv-row { - gap: 6px 10px; - } - - body.hub-page-funds:not(.hub-phone) .funds-stage-inner { - padding: 6px 8px 6px; - } - - body.hub-page-funds:not(.hub-phone) .funds-chart-panel { - min-height: 110px; - max-height: 36vh; - margin-bottom: 6px; - } - - body.hub-page-funds:not(.hub-phone) .funds-chart-host { - min-height: 100px; - } - - body.hub-page-funds:not(.hub-phone) .funds-stat-card { - padding: 6px 8px; - } - - body.hub-page-funds:not(.hub-phone) .funds-stat-value { - font-size: 1rem; - } - - body.hub-page-funds:not(.hub-phone) .funds-ac-card { - padding: 6px 8px; - } +/* + * 平板(hub-tablet):优先卡片内容完整可见。 + * 2560×1600@2x ≈ 1280×800 CSS —— 不再强行裁切 overflow:hidden / 均分 1fr 行高。 + * 整页允许纵向滚动;桌面大屏仍走上方一屏规则。 + */ +body.hub-tablet.hub-page-monitor:not(.hub-phone) .app-shell { + height: auto; + max-height: none; + min-height: 100dvh; + overflow-x: hidden; + overflow-y: auto; + padding-bottom: 16px; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .app-header { + padding: 8px 0 6px; } -/* 平板标识下的额外压缩(JS hub-tablet) */ body.hub-tablet.hub-page-monitor:not(.hub-phone) .brand-sub { display: none; } +body.hub-tablet.hub-page-monitor:not(.hub-phone) #page-monitor { + flex: 1 0 auto; + height: auto; + min-height: 0; + overflow: visible; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) #page-monitor > .page-head { + margin: 6px 0 6px; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) #page-monitor > .page-head h1 { + font-size: 16px; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) #page-monitor .grid-monitor { + flex: 1 0 auto; + height: auto; + min-height: 0; + overflow: visible; + gap: 12px; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .grid-monitor.grid-monitor-options-split { + height: auto; + gap: 10px; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .grid-monitor-options-split .monitor-stats-card { + padding: 8px 12px; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .grid-monitor-options-split .monitor-stat-value { + font-size: 14px; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .grid-monitor-options-split .monitor-split-body { + flex: 0 0 auto; + height: auto; + min-height: 0; + align-items: start; + gap: 12px; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .monitor-split-left > .card, +body.hub-tablet.hub-page-monitor:not(.hub-phone) .monitor-split-right > .card { + height: auto; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .monitor-split-right { + grid-template-rows: auto auto; + align-content: start; + gap: 12px; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .hub-inner-cards { + grid-template-rows: auto auto; + align-content: start; + gap: 10px; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .card-monitor-okx-split, +body.hub-tablet.hub-page-monitor:not(.hub-phone) .card-monitor-split-side, +body.hub-tablet.hub-page-monitor:not(.hub-phone) .card-monitor-okx-split .card-body, +body.hub-tablet.hub-page-monitor:not(.hub-phone) .card-monitor-split-side .card-body, +body.hub-tablet.hub-page-monitor:not(.hub-phone) .hub-inner-card { + overflow: visible; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .card-monitor-okx-split .card-head, +body.hub-tablet.hub-page-monitor:not(.hub-phone) .card-monitor-split-side .card-head { + padding: 8px 12px; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .card-monitor-okx-split .card-body, +body.hub-tablet.hub-page-monitor:not(.hub-phone) .card-monitor-split-side .card-body { + padding: 10px 12px; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .hub-inner-card-head { + padding: 8px 10px; + font-size: 12px; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .hub-inner-card-body { + padding: 8px 10px; + overflow: visible; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .grid-monitor-options-split .hub-options-table-wrap, +body.hub-tablet.hub-page-monitor:not(.hub-phone) .grid-monitor-options-split .pos-table-wrap, +body.hub-tablet.hub-page-monitor:not(.hub-phone) .grid-monitor-options-split .table-scroll { + overflow: visible; + max-height: none; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .data-table th, +body.hub-tablet.hub-page-monitor:not(.hub-phone) .data-table td { + padding: 6px 8px; + font-size: 12px; + line-height: 1.35; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .section-title { + margin: 8px 0 6px; + font-size: 12px; +} + +body.hub-tablet.hub-page-monitor:not(.hub-phone) .empty-hint { + padding: 8px 0; + font-size: 12px; +} + +/* 平板资金概况:勿裁切分户卡片 */ +body.hub-tablet.hub-page-funds:not(.hub-phone) .app-shell { + height: auto; + max-height: none; + min-height: 100dvh; + overflow-x: hidden; + overflow-y: auto; + padding-bottom: 16px; +} + +body.hub-tablet.hub-page-funds:not(.hub-phone) #page-funds, +body.hub-tablet.hub-page-funds:not(.hub-phone) .funds-stage, +body.hub-tablet.hub-page-funds:not(.hub-phone) .funds-stage-inner { + height: auto; + max-height: none; + overflow: visible; + flex: 1 0 auto; +} + +body.hub-tablet.hub-page-funds:not(.hub-phone) .funds-chart-panel { + flex: 0 0 auto; + height: 240px; + max-height: none; + min-height: 200px; + margin-bottom: 12px; +} + +body.hub-tablet.hub-page-funds:not(.hub-phone) .funds-chart-host { + height: 200px; + min-height: 180px; +} + +body.hub-tablet.hub-page-funds:not(.hub-phone) .funds-accounts { + flex: 0 0 auto; +} + +body.hub-tablet.hub-page-funds:not(.hub-phone) .funds-ac-card { + padding: 12px 14px; + overflow: visible; +} + +body.hub-tablet.hub-page-funds:not(.hub-phone) .funds-stat-value { + font-size: 1.2rem; +} + +/* 平板行情:保持一屏图表,但勿过度压扁 OHLCV */ +body.hub-tablet.hub-page-market:not(.hub-phone) #page-market .market-ohlcv-bar { + padding: 8px 10px; +} + +body.hub-tablet.hub-page-market:not(.hub-phone) #page-market > .page-head h1 { + font-size: 16px; +} + diff --git a/manual_trading_hub/static/index.html b/manual_trading_hub/static/index.html index e4ba11c..7371890 100644 --- a/manual_trading_hub/static/index.html +++ b/manual_trading_hub/static/index.html @@ -15,7 +15,7 @@ - +