diff --git a/webui/app.js b/webui/app.js index a7ea931..af6a12d 100644 --- a/webui/app.js +++ b/webui/app.js @@ -334,6 +334,7 @@ function initConfigSearch() { const apply = (q) => { const query = q.trim().toLowerCase(); if (clear) clear.toggleAttribute("hidden", !query); + const countBadge = document.getElementById("configSearchCount"); if (!query) { // Restore all @@ -341,6 +342,7 @@ function initConfigSearch() { allSectionTitles.forEach((s) => s.classList.remove("isSearchHidden")); document.querySelectorAll(".panel").forEach((p) => p.classList.remove("isSearchAllHidden")); if (empty) empty.hidden = true; + if (countBadge) countBadge.hidden = true; // Re-apply normal tab visibility (panels may have been forced visible) const activeTab = document.querySelector(".tabBtn.active[data-target]"); if (activeTab) { @@ -389,6 +391,10 @@ function initConfigSearch() { }); if (empty) empty.hidden = totalVisible > 0; + if (countBadge) { + countBadge.hidden = false; + countBadge.textContent = `${totalVisible} 项`; + } }; let debounceTimer; @@ -2130,6 +2136,19 @@ async function pollStats() { setTextIfExists("statFudaiAttendFail", getC("fudai_attend_fail")); setTextIfExists("statFudaiNoWin", getC("fudai_result_no_win")); setTextIfExists("statFudaiWin", getC("fudai_result_win")); + // 福袋统计语义着色 + const colorize = (id, kind, n) => { + const el = document.getElementById(id); + if (!el) return; + el.classList.toggle("stateOk", kind === "ok" && n > 0); + el.classList.toggle("stateError", kind === "error" && n > 0); + el.classList.toggle("stateWarn", kind === "warn" && n > 0); + el.classList.toggle("stateMuted", kind === "muted" && n > 0); + }; + colorize("statFudaiAttendOk", "ok", getC("fudai_attend_ok")); + colorize("statFudaiWin", "ok", getC("fudai_result_win")); + colorize("statFudaiAttendFail", "error", getC("fudai_attend_fail")); + colorize("statFudaiNoWin", "muted", getC("fudai_result_no_win")); setTextIfExists("topFudaiState", UI_COPY.overview.fudaiState(getC("fudai_open_detail"), getC("fudai_attend_ok"))); setTextIfExists("topFudaiMeta", UI_COPY.overview.fudaiMeta(getC("fudai_seen"), getC("fudai_result_win"))); diff --git a/webui/index.html b/webui/index.html index da42991..cae8912 100644 --- a/webui/index.html +++ b/webui/index.html @@ -15,7 +15,7 @@ } catch (e) {} })(); - +
@@ -193,6 +193,7 @@ + - + diff --git a/webui/styles.css b/webui/styles.css index 29c5749..402b389 100644 --- a/webui/styles.css +++ b/webui/styles.css @@ -1019,6 +1019,25 @@ svg { transition: opacity var(--motion-fast); } +.workspaceSearchCount { + position: absolute; + right: 30px; + top: 50%; + transform: translateY(-50%); + padding: 1px 7px; + border-radius: 99px; + background: var(--primary-soft); + color: var(--primary-accent-text); + font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; + font-size: 10px; + font-variant-numeric: tabular-nums; + pointer-events: none; +} + +.workspaceSearchCount[hidden] { + display: none; +} + .workspaceSearch:focus-within .workspaceSearchKbd, .workspaceSearch input:not(:placeholder-shown) ~ .workspaceSearchKbd { opacity: 0; @@ -1224,6 +1243,18 @@ svg { text-transform: uppercase; line-height: 1.3; border-bottom: 1px solid var(--border); + position: sticky; + top: 64px; + z-index: 4; + background: linear-gradient(180deg, var(--surface) 70%, color-mix(in oklab, var(--surface) 0%, transparent)); + backdrop-filter: blur(6px); +} + +.cardTitle.sectionTitle, +summary.sectionTitle { + position: static; + background: transparent; + backdrop-filter: none; } .sectionTitle::before { @@ -1462,11 +1493,12 @@ input[type="number"]::-webkit-outer-spin-button { .chart > .hint:only-child, .reservationsContent > .hint:only-child { display: flex; + flex-direction: column; align-items: center; justify-content: center; gap: 8px; - min-height: 60px; - padding: 16px; + min-height: 80px; + padding: 24px 16px; border: 1px dashed var(--border); border-radius: var(--radius-md); background: color-mix(in oklab, var(--surface-soft) 60%, transparent); @@ -1479,12 +1511,13 @@ input[type="number"]::-webkit-outer-spin-button { .chart > .hint:only-child::before, .reservationsContent > .hint:only-child::before { content: ""; - width: 14px; - height: 14px; - border: 1.5px dashed currentColor; - border-radius: 50%; - opacity: 0.6; - flex: 0 0 14px; + width: 28px; + height: 28px; + flex: 0 0 28px; + background-color: currentColor; + -webkit-mask: url("data:image/svg+xml;utf8,") no-repeat center / contain; + mask: url("data:image/svg+xml;utf8,") no-repeat center / contain; + opacity: 0.55; } .divider { @@ -1568,6 +1601,10 @@ input[type="number"]::-webkit-outer-spin-button { color: var(--danger); } +.statValue.stateWarn { + color: var(--warning); +} + .statValue.hasCopy { position: relative; padding-right: 28px;