diff --git a/manual_trading_hub/static/app.css b/manual_trading_hub/static/app.css index cf88276..a48a6be 100644 --- a/manual_trading_hub/static/app.css +++ b/manual_trading_hub/static/app.css @@ -5493,7 +5493,7 @@ body.funds-fullscreen-open { flex-direction: column; gap: 10px; padding: 12px; - min-height: 100%; + min-height: calc(100vh - 200px); overflow: hidden; } .archive-panel-head { @@ -5527,9 +5527,12 @@ body.funds-fullscreen-open { font-size: 0.82rem; resize: vertical; } +.archive-quote-form textarea { + min-height: 110px; +} .archive-quotes-list { flex: 1 1 auto; - min-height: 0; + min-height: 420px; overflow: auto; display: flex; flex-direction: column; @@ -5543,13 +5546,21 @@ body.funds-fullscreen-open { } .archive-quote-summary { display: grid; - grid-template-columns: auto 1fr; + grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; cursor: pointer; list-style: none; } +.archive-quote-open-hint { + font-size: 0.7rem; + color: var(--accent); + white-space: nowrap; +} +.archive-quote-card[open] .archive-quote-open-hint { + color: var(--muted); +} .archive-quote-summary::-webkit-details-marker { display: none; } @@ -5572,9 +5583,21 @@ body.funds-fullscreen-open { flex-direction: column; gap: 8px; } +.archive-quote-full { + padding: 10px 12px; + border-radius: 8px; + border: 1px solid var(--border-soft); + background: var(--panel); + color: var(--text); + font-size: 0.82rem; + line-height: 1.55; + white-space: pre-wrap; + word-break: break-word; + max-height: none; +} .archive-quote-edit { width: 100%; - min-height: 72px; + min-height: 160px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border-soft); @@ -5583,6 +5606,8 @@ body.funds-fullscreen-open { font-family: var(--font); font-size: 0.8rem; resize: vertical; + line-height: 1.55; + white-space: pre-wrap; } .archive-quote-actions { display: flex; @@ -5914,8 +5939,11 @@ body.funds-fullscreen-open { min-height: 0; } .archive-quotes-panel { - min-height: 280px; - max-height: 320px; + min-height: 360px; + max-height: none; + } + .archive-quotes-list { + min-height: 220px; } } diff --git a/manual_trading_hub/static/archive.js b/manual_trading_hub/static/archive.js index f02a50c..3dd709e 100644 --- a/manual_trading_hub/static/archive.js +++ b/manual_trading_hub/static/archive.js @@ -480,6 +480,22 @@ return s.length > 36 ? s.slice(0, 36) + "…" : s; } + function quoteEditRows(text) { + const t = String(text || ""); + const lines = t.split(/\n/).length; + const wrapLines = Math.ceil(t.length / 26); + return Math.min(32, Math.max(8, lines, wrapLines)); + } + + function resizeQuoteTextarea(ta) { + if (!ta) return; + ta.style.height = "auto"; + const lines = String(ta.value || "").split("\n").length; + const wrapLines = Math.ceil(String(ta.value || "").length / 26); + ta.rows = Math.min(32, Math.max(8, lines, wrapLines)); + ta.style.height = Math.max(ta.scrollHeight, 160) + "px"; + } + function renderQuotes() { if (!elQuotesList) return; if (elQuotesCount) { @@ -500,11 +516,17 @@ '' + esc(quotePreview(q.content)) + "" + + '查看' + "" + '
' + + '
' + + esc(q.content || "(空)") + + "
" + '" + '
' + @@ -519,6 +541,12 @@ }) .join(""); + elQuotesList.querySelectorAll(".archive-quote-card").forEach(function (card) { + card.addEventListener("toggle", function () { + if (!card.open) return; + resizeQuoteTextarea(card.querySelector(".archive-quote-edit")); + }); + }); elQuotesList.querySelectorAll(".archive-quote-save").forEach(function (btn) { btn.addEventListener("click", function () { const id = btn.getAttribute("data-id"); diff --git a/manual_trading_hub/static/index.html b/manual_trading_hub/static/index.html index ded6bde..ede1b80 100644 --- a/manual_trading_hub/static/index.html +++ b/manual_trading_hub/static/index.html @@ -15,7 +15,7 @@ - + @@ -302,7 +302,7 @@
- +
@@ -584,7 +584,7 @@ - +