总览拉取时间并入已更新行,除工作台外各页 1800 宽并左右留白。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+7
-19
@@ -206,25 +206,19 @@ 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;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
padding: 0 clamp(6px, 1vw, 14px) 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));
|
||||
max-width: 1800px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
padding: 0 clamp(24px, 4vw, 64px) 16px;
|
||||
}
|
||||
body.page-settings .settings-shell {
|
||||
max-width: none;
|
||||
@@ -233,7 +227,6 @@ body.page-instances .main {
|
||||
body.page-settings .settings-grid {
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
body.page-desk {
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
@@ -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
@@ -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 || "加载失败";
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}加密货币|OKX 期权中控{% endblock %}</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='hub.css') }}?v=35">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='hub.css') }}?v=36">
|
||||
</head>
|
||||
<body class="{% if request.path.startswith('/login') %}page-login{% elif request.path.startswith('/desk') %}page-desk{% elif request.path.startswith('/stats') %}page-stats{% elif request.path.startswith('/instances') %}page-instances{% elif request.path.startswith('/settings') %}page-settings{% elif request.path.startswith('/cond_orders') %}page-cond-orders{% elif request.path == '/' %}page-dashboard{% endif %}">
|
||||
{% if session.get('logged_in') %}
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
<div id="overview-grid"></div>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ url_for('static', filename='hub.js') }}?v=24"></script>
|
||||
<script src="{{ url_for('static', filename='hub.js') }}?v=25"></script>
|
||||
<script>HubOverview.boot();</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user