diff --git a/webui/app.js b/webui/app.js index 5634299..45d15a9 100644 --- a/webui/app.js +++ b/webui/app.js @@ -240,7 +240,9 @@ function initTheme() { btn.addEventListener("click", () => { const next = root.getAttribute("data-theme") === "dark" ? "light" : "dark"; try { localStorage.setItem("ui-theme", next); } catch (_) {} + root.classList.add("isThemeSwitching"); apply(next); + setTimeout(() => root.classList.remove("isThemeSwitching"), 260); }); } diff --git a/webui/index.html b/webui/index.html index 0857616..92d02a8 100644 --- a/webui/index.html +++ b/webui/index.html @@ -15,7 +15,7 @@ } catch (e) {} })(); - +
@@ -1252,6 +1252,6 @@
- + diff --git a/webui/styles.css b/webui/styles.css index 2f5104b..389a540 100644 --- a/webui/styles.css +++ b/webui/styles.css @@ -172,6 +172,31 @@ body { letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; + transition: color 200ms ease, background-color 200ms ease; +} + +/* 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, +:root.isThemeSwitching .card, +:root.isThemeSwitching .panel, +:root.isThemeSwitching .overviewCard, +:root.isThemeSwitching .stat, +:root.isThemeSwitching .btn, +:root.isThemeSwitching .input, +:root.isThemeSwitching .check, +:root.isThemeSwitching .tabBtn, +:root.isThemeSwitching .table, +:root.isThemeSwitching .tableRow, +:root.isThemeSwitching .logSection, +:root.isThemeSwitching .log, +:root.isThemeSwitching .preview, +:root.isThemeSwitching .reservationItem, +:root.isThemeSwitching .chartBlock, +:root.isThemeSwitching .toast, +:root.isThemeSwitching .appFooter, +:root.isThemeSwitching .workspaceHeader { + transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease !important; } @keyframes surfaceIn { @@ -214,6 +239,16 @@ svg { width: min(var(--page-max), 100%); margin: 0 auto; padding: var(--page-pad); + animation: appFadeIn 220ms ease both; +} + +@keyframes appFadeIn { + from { opacity: 0; transform: translateY(2px); } + to { opacity: 1; transform: translateY(0); } +} + +@media (prefers-reduced-motion: reduce) { + .app { animation: none; } } .header { @@ -2841,6 +2876,14 @@ details[open] > summary.sectionTitle::before { --overview-gap: 8px; } + .subtitle { + display: none; + } + + .appConnText { + display: none; + } + .app { padding: var(--page-pad); }