总览拉取时间并入已更新行,除工作台外各页 1800 宽并左右留白。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-04 21:57:53 +08:00
parent 1b0acfdb08
commit d7f1e0d2de
4 changed files with 30 additions and 34 deletions
+15 -27
View File
@@ -206,33 +206,26 @@ a:hover { color: #7dd3fc; }
.main {
width: 100%;
max-width: 1200px;
max-width: 1800px;
margin: 0 auto;
padding: 0 clamp(6px, 1vw, 14px) 16px;
padding: 0 clamp(24px, 4vw, 64px) 16px;
}
/* 总览/实例与客户端一致: 铺满,带鱼屏锁 1800 */
body.page-dashboard .main,
body.page-instances .main {
max-width: none;
body.page-instances .main,
body.page-stats .main,
body.page-settings .main,
body.page-cond-orders .main {
max-width: 1800px;
width: 100%;
margin: 0 auto;
padding: 0 clamp(6px, 1vw, 14px) 16px;
padding: 0 clamp(24px, 4vw, 64px) 16px;
}
@media (min-aspect-ratio: 21/9) {
body.page-dashboard .main,
body.page-instances .main,
body.page-stats .main,
body.page-settings .main,
body.page-cond-orders .main {
max-width: min(1800px, calc(100vw - 24px));
}
body.page-settings .settings-shell {
max-width: none;
width: 100%;
}
body.page-settings .settings-grid {
max-width: none;
}
body.page-settings .settings-shell {
max-width: none;
width: 100%;
}
body.page-settings .settings-grid {
max-width: none;
}
body.page-desk {
height: 100vh;
@@ -1671,10 +1664,5 @@ input.readonly {
font-size: 0.75rem;
}
body.page-stats .main {
max-width: 1400px;
}
@media (min-aspect-ratio: 21/9) {
body.page-stats .main {
max-width: min(1800px, calc(100vw - 24px));
}
max-width: 1800px;
}
+13 -5
View File
@@ -351,9 +351,6 @@
"<td>" +
bidLiquiditySummary(brief) +
"</td>" +
'<td class="muted">' +
escapeHtml(row.pulled_at || "—") +
"</td>" +
'<td><div class="overview-actions">' +
'<a class="btn" href="/desk?id=' +
encodeURIComponent(row.id) +
@@ -566,6 +563,15 @@
});
}
function latestPulledAt(list) {
let best = "";
(list || []).forEach(function (row) {
const t = String((row && row.pulled_at) || "").trim();
if (t && t !== "—" && t > best) best = t;
});
return best;
}
async function refresh() {
const status = document.getElementById("overview-status");
const grid = document.getElementById("overview-grid");
@@ -585,7 +591,7 @@
grid.innerHTML =
'<div class="overview-table-wrap"><table class="overview-table">' +
"<thead><tr>" +
"<th>名称</th><th>状态</th><th>模式</th><th>浮盈</th><th>权利金</th><th>资金占比</th><th>持仓</th><th>出场</th><th>买一/流动性</th><th>拉取时间</th><th>操作</th>" +
"<th>名称</th><th>状态</th><th>模式</th><th>浮盈</th><th>权利金</th><th>资金占比</th><th>持仓</th><th>出场</th><th>买一/流动性</th><th>操作</th>" +
"</tr></thead><tbody>" +
list.map(renderRow).join("") +
"</tbody></table></div>";
@@ -597,13 +603,15 @@
}
if (status) {
const s = summarizeOverview(list);
const pulled = latestPulledAt(list);
status.textContent =
"已更新 · 共 " +
list.length +
" 台 · 在线 " +
s.all.online +
" · 离线 " +
s.all.offline;
s.all.offline +
(pulled ? " · 拉取时间 " + pulled : "");
}
} catch (e) {
if (status) status.textContent = e.message || "加载失败";