From 7001919642ee21d3229adabb857ea5f13626ab92 Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 21 May 2026 12:02:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B2=BE=E4=BF=AE=20WebUI=20v30=EF=BC=9A?= =?UTF-8?q?=E8=BF=9B=E7=A8=8B=E5=BF=83=E8=B7=B3=20/=20=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E6=9D=A1=20/=20=E9=AA=A8=E6=9E=B6=20/=20=E5=8F=96=E6=99=AF?= =?UTF-8?q?=E5=99=A8=20hover=20/=20SVG=20glow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 全局 running 信号 - body.is-running 在视口顶部 fixed 2px 粉→青→粉横向 sweep glow line - 2.8s 横向滚动 + 4px primary drop-shadow,进程"心跳"信号 滚动条 - 全局 webkit-scrollbar-thumb 改 180deg 粉→青渐变(55% mix) - hover 升级为纯色 primary→secondary 渐变 骨架屏 - shimmer 渐变改为粉/青双色横扫(35% / 65% 节点 22% mix) - 节奏 1.6s → 1.8s 更柔和 截图区取景器 - previewBracket hover 时 18→22px + drop-shadow 6→10px primary 75% - 尺寸 + glow 同步过渡 Timeline 折线 - SVG defs 加 feGaussianBlur (1.6) + feMerge glow filter - 折线 stroke-width 1.5→1.8 并应用 filter,霓虹光晕 - 与 chart hover 渐变协同 cache-bust v29 → v30 --- webui/app.js | 18 +++++++++++++++++- webui/index.html | 4 ++-- webui/styles.css | 42 ++++++++++++++++++++++++++++++++++++++---- 3 files changed, 57 insertions(+), 7 deletions(-) diff --git a/webui/app.js b/webui/app.js index 8296dfa..57bf1bb 100644 --- a/webui/app.js +++ b/webui/app.js @@ -1280,6 +1280,21 @@ function renderTimeline(containerId, timeline) { svg.setAttribute("height", String(H)); svg.classList.add("timelineSvg"); + // SVG glow filter(feGaussianBlur + feMerge)让折线带霓虹光晕 + const NS_FILTER = "http://www.w3.org/2000/svg"; + const defs = document.createElementNS(NS_FILTER, "defs"); + const filterId = (containerId || "timeline") + "Glow"; + defs.innerHTML = ` + + + + + + + + `; + svg.appendChild(defs); + const axis = document.createElementNS("http://www.w3.org/2000/svg", "path"); axis.setAttribute("d", `M ${padL} ${H - padB} L ${W - padR} ${H - padB}`); axis.setAttribute("stroke", "var(--border)"); @@ -1353,11 +1368,12 @@ function renderTimeline(containerId, timeline) { p.setAttribute("d", d); p.setAttribute("fill", "none"); p.setAttribute("stroke", TIMELINE_STROKES[k]?.stroke || "var(--primary)"); - p.setAttribute("stroke-width", "1.5"); + p.setAttribute("stroke-width", "1.8"); p.setAttribute("stroke-opacity", String(TIMELINE_STROKES[k]?.opacity ?? 1)); if (TIMELINE_STROKES[k]?.dash) p.setAttribute("stroke-dasharray", TIMELINE_STROKES[k].dash); p.setAttribute("stroke-linecap", "round"); p.setAttribute("stroke-linejoin", "round"); + p.setAttribute("filter", `url(#${filterId})`); svg.appendChild(p); } diff --git a/webui/index.html b/webui/index.html index cce6240..d246e7e 100644 --- a/webui/index.html +++ b/webui/index.html @@ -19,7 +19,7 @@ } catch (e) {} })(); - +
@@ -1274,6 +1274,6 @@ - + diff --git a/webui/styles.css b/webui/styles.css index ebe04c0..eeb2e9b 100644 --- a/webui/styles.css +++ b/webui/styles.css @@ -223,6 +223,32 @@ body::after { mix-blend-mode: overlay; } +/* When body.is-running: thin pink sweep glow line at top edge of viewport */ +body.is-running::before { + content: ""; + position: fixed; + left: 0; + right: 0; + top: 0; + height: 2px; + z-index: 1000; + pointer-events: none; + background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), var(--primary), transparent); + background-size: 200% 100%; + animation: runningPulse 2.8s linear infinite; + filter: drop-shadow(0 0 4px color-mix(in oklab, var(--primary) 70%, transparent)); +} + +@keyframes runningPulse { + 0% { background-position: -100% 0; opacity: 0.85; } + 50% { opacity: 1; } + 100% { background-position: 200% 0; opacity: 0.85; } +} + +@media (prefers-reduced-motion: reduce) { + body.is-running::before { animation: none; } +} + /* When toggling theme, briefly enable transitions on common chrome surfaces. The .isThemeSwitching class is added by JS for ~250ms during the toggle. */ :root.isThemeSwitching .header, @@ -2665,6 +2691,13 @@ input[type="number"]::-webkit-outer-spin-button { pointer-events: none; border: 2px solid var(--primary); filter: drop-shadow(0 0 6px color-mix(in oklab, var(--primary) 50%, transparent)); + transition: width var(--motion), height var(--motion), border-color var(--motion-fast), filter var(--motion-fast); +} + +.preview:hover .previewBracket { + width: 22px; + height: 22px; + filter: drop-shadow(0 0 10px color-mix(in oklab, var(--primary) 75%, transparent)); } .previewBracketTL { top: 8px; left: 8px; border-right: 0; border-bottom: 0; border-top-left-radius: 4px; } @@ -3266,11 +3299,12 @@ details[open] > summary.sectionTitle::before { background: linear-gradient(90deg, transparent 0, - color-mix(in oklab, var(--text) 6%, transparent) 50%, + color-mix(in oklab, var(--primary) 22%, transparent) 35%, + color-mix(in oklab, var(--secondary) 22%, transparent) 65%, transparent 100%) var(--surface-muted); background-size: 200% 100%; background-repeat: no-repeat; - animation: skeletonShimmer 1.6s linear infinite; + animation: skeletonShimmer 1.8s linear infinite; border-radius: var(--radius-sm); color: transparent !important; user-select: none; @@ -3503,14 +3537,14 @@ details[open] > summary.sectionTitle::before { } *::-webkit-scrollbar-thumb { - background: var(--border-strong); + background: linear-gradient(180deg, color-mix(in oklab, var(--primary) 55%, var(--border-strong)), color-mix(in oklab, var(--secondary) 55%, var(--border-strong))); border: 2px solid transparent; background-clip: padding-box; border-radius: 99px; } *::-webkit-scrollbar-thumb:hover { - background: var(--hover-border); + background: linear-gradient(180deg, var(--primary), var(--secondary)); background-clip: padding-box; }