diff --git a/manual_trading_hub/static/app.css b/manual_trading_hub/static/app.css index 427fa18..224fd9f 100644 --- a/manual_trading_hub/static/app.css +++ b/manual_trading_hub/static/app.css @@ -5532,49 +5532,61 @@ body.funds-fullscreen-open { } .archive-quotes-list { flex: 1 1 auto; - min-height: 160px; + min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; } +.archive-quote-block { + display: flex; + flex-direction: column; + gap: 0; + border: 1px solid var(--border-soft); + border-radius: 8px; + background: var(--inset-surface); + overflow: hidden; +} +.archive-quote-block.is-open { + border-color: var(--accent); +} .archive-quote-item { display: grid; - grid-template-columns: auto 1fr; + grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; width: 100%; padding: 8px 10px; - border: 1px solid var(--border-soft); - border-radius: 8px; - background: var(--inset-surface); + border: 0; + border-radius: 0; + background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; } .archive-quote-item:hover { - border-color: color-mix(in srgb, var(--accent) 40%, var(--border-soft)); + background: color-mix(in srgb, var(--accent) 8%, transparent); } .archive-quote-item.is-selected { - border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--inset-surface)); } +.archive-quote-open-hint { + font-size: 0.7rem; + color: var(--accent); + white-space: nowrap; +} .archive-quote-detail { - flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; - padding-top: 10px; + padding: 0 10px 10px; border-top: 1px solid var(--border-soft); - min-height: 140px; - max-height: 42vh; } .archive-quote-detail .archive-quote-full { - flex: 1 1 auto; - min-height: 96px; - max-height: 34vh; - overflow: auto; + min-height: 120px; + max-height: none; + overflow: visible; } .archive-quote-date { font-weight: 600; @@ -5648,6 +5660,15 @@ body.funds-fullscreen-open { color: var(--muted); font-size: 0.82rem; } +.archive-overview-panel { + display: flex; + flex-direction: column; + gap: 8px; + min-width: 0; +} +.archive-overview-panel > .archive-panel-head { + display: none; +} .archive-stats-bar { padding: 0; border-radius: 8px; @@ -5926,19 +5947,49 @@ body.funds-fullscreen-open { font-size: 0.85rem; } @media (max-width: 900px) { - .archive-layout { - grid-template-columns: 1fr; + #page-archive .page-desc { + display: none; + } + #page-archive .archive-toolbar-desktop, + #page-archive .archive-panel-desktop { + display: none !important; + } + #page-archive .archive-toolbar { + margin-bottom: 10px; + } + #page-archive .archive-layout { + display: flex; + flex-direction: column; + gap: 12px; min-height: 0; } - .archive-quotes-panel { - min-height: 360px; + #page-archive .archive-quotes-panel { + order: 1; + flex: 0 0 auto; + min-height: 0; max-height: none; + overflow: visible; } - .archive-quotes-list { + #page-archive .archive-main-panel { + order: 2; + flex: 0 0 auto; + min-height: 0; + gap: 0; + } + #page-archive .archive-overview-panel { + width: 100%; + } + #page-archive .archive-overview-panel > .archive-panel-head { + display: flex; + } + #page-archive .archive-quotes-list { min-height: 120px; + max-height: 42vh; } - .archive-quote-detail { - max-height: 36vh; + #page-archive .archive-stats-table th, + #page-archive .archive-stats-table td { + padding: 6px 8px; + font-size: 0.74rem; } } diff --git a/manual_trading_hub/static/archive.js b/manual_trading_hub/static/archive.js index 20e1b65..a26da76 100644 --- a/manual_trading_hub/static/archive.js +++ b/manual_trading_hub/static/archive.js @@ -26,10 +26,6 @@ const elQuoteDate = document.getElementById("archive-quote-date"); const elQuoteContent = document.getElementById("archive-quote-content"); const elQuoteSubmit = document.getElementById("archive-quote-submit"); - const elQuoteDetail = document.getElementById("archive-quote-detail"); - const elQuoteDetailFull = document.getElementById("archive-quote-detail-full"); - const elQuoteEditBtn = document.getElementById("archive-quote-edit-btn"); - const elQuoteDelBtn = document.getElementById("archive-quote-del-btn"); const elChartSection = document.getElementById("archive-chart-section"); const elChartTitle = document.getElementById("archive-chart-title"); const elTfTabs = document.getElementById("archive-tf-tabs"); @@ -520,24 +516,13 @@ } function selectQuote(id) { - if (editingQuoteId != null && String(id) !== String(editingQuoteId)) { + const nextId = String(id); + const same = selectedQuoteId != null && String(selectedQuoteId) === nextId; + if (editingQuoteId != null && String(editingQuoteId) !== nextId) { resetQuoteForm(); } - selectedQuoteId = id; + selectedQuoteId = same ? null : id; renderQuotes(); - renderQuoteDetail(); - } - - function renderQuoteDetail() { - if (!elQuoteDetail) return; - const q = findQuote(selectedQuoteId); - if (!q) { - elQuoteDetail.hidden = true; - if (elQuoteDetailFull) elQuoteDetailFull.textContent = ""; - return; - } - elQuoteDetail.hidden = false; - if (elQuoteDetailFull) elQuoteDetailFull.textContent = q.content || "(空)"; } function renderQuotes() { @@ -547,13 +532,15 @@ } if (!quotes.length) { elQuotesList.innerHTML = '
暂无复盘语录,可在上方添加。
'; - if (elQuoteDetail) elQuoteDetail.hidden = true; return; } elQuotesList.innerHTML = quotes .map(function (q) { const selected = String(q.id) === String(selectedQuoteId); return ( + '复盘语录 · 当日交易记录 · 按需查看 K 线