From 6d8e8704ccc8ee801fce16efd717a596e39e76ad Mon Sep 17 00:00:00 2001 From: Fredrik Ahlgren Date: Sun, 25 Oct 2026 18:17:05 +0100 Subject: [PATCH] feat(web): the dashboard takes the iOS app's palette theme.css now carries the phone's colours: a blue-black ground, ink for the interface, one grid hue both ways, solar, a battery that stores in cyan and gives in orange, a violet car, and two states, --live and --alarm. --green and --red now alias those states; energy keeps the -e names. Every use of a red, green or amber name is sorted into energy or state. States (ok, connected, done, failed, blocked, danger buttons, warnings that need action) move to --live or --alarm; warnings that need no action move to ink2. Battery, car and solar flows that sat on the grid names move to their own hue. Prices and savings become ink levels. Text on an accent fill reads --on-accent, now that the accent is ink. Co-Authored-By: Claude Opus 5.5 --- .changeset/ios-palette-web.md | 5 + web/app.css | 91 +++++++--------- web/app.js | 34 ++---- web/car-soc-history.js | 6 +- web/components/energy-flow-readings.js | 8 +- web/components/ftw-badge.js | 24 ++--- web/components/ftw-battery-control.js | 16 +-- web/components/ftw-energy-cake.js | 4 +- web/components/ftw-energy-flow.js | 21 ++-- web/components/ftw-history-card.js | 4 +- web/components/ftw-notif-history.js | 8 +- web/components/ftw-price-chart.js | 35 +++--- web/components/ftw-progress-bar.js | 22 ++-- web/components/ftw-pv-control.js | 16 +-- web/components/ftw-savings-card.js | 14 +-- web/components/theme.css | 144 ++++++++++++------------- web/diagnostics-modal.js | 20 ++-- web/header-status-marks.test.mjs | 8 +- web/history-migration.js | 2 +- web/lan-auth.js | 2 +- web/project-statistics.css | 2 +- web/settings.js | 2 +- web/settings/tabs/devices.js | 24 ++--- web/setup.html | 14 +-- web/setup.js | 6 +- web/style.css | 137 ++++++++++++----------- web/theme-unification.test.mjs | 59 ++++++---- web/update-badge.js | 14 +-- 28 files changed, 363 insertions(+), 379 deletions(-) create mode 100644 .changeset/ios-palette-web.md diff --git a/.changeset/ios-palette-web.md b/.changeset/ios-palette-web.md new file mode 100644 index 000000000..f4a751306 --- /dev/null +++ b/.changeset/ios-palette-web.md @@ -0,0 +1,5 @@ +--- +"ftw": patch +--- + +The box's dashboard now uses the phone app's colours. The grid is one pink colour both ways, and the sign and the word say whether you buy or sell. The battery is cyan when it stores power and orange when it gives power, and the car is violet. Green now only means live or confirmed, and red only means refused, failed or blocked. Prices are shades of ink, not red and green. diff --git a/web/app.css b/web/app.css index c6b32c098..82a81b6f7 100644 --- a/web/app.css +++ b/web/app.css @@ -209,7 +209,7 @@ body.ftw-app .icon-btn:hover { } body.ftw-app .icon-btn[aria-pressed="true"] { color: var(--fg); - background: oklch(0.3 0.1 var(--accent-hue) / 0.2); + background: color-mix(in oklab, var(--accent-e) 12%, transparent); border-color: var(--accent-e); } body.ftw-app .icon-btn[aria-pressed="true"]:hover { @@ -346,7 +346,7 @@ body.ftw-app #overview-cars[hidden] { display: none !important; } body.ftw-app .overview-cars-age { - color: var(--amber); + color: var(--fg-dim); font-family: var(--mono); font-size: 11px; } @@ -434,15 +434,15 @@ body.ftw-app .overview-health-dot { width: 7px; height: 7px; border-radius: 50%; - background: var(--red-e); - box-shadow: 0 0 0 3px color-mix(in oklch, var(--red-e) 14%, transparent); + background: var(--alarm); + box-shadow: 0 0 0 3px color-mix(in oklch, var(--alarm) 14%, transparent); } body.ftw-app .overview-health.is-connected { color: var(--fg-dim); } body.ftw-app .overview-health.is-connected .overview-health-dot { - background: var(--green-e); - box-shadow: 0 0 0 3px color-mix(in oklch, var(--green-e) 14%, transparent); + background: var(--live); + box-shadow: 0 0 0 3px color-mix(in oklch, var(--live) 14%, transparent); } body.ftw-app .section-kicker { margin: 0 0 3px; @@ -746,10 +746,10 @@ body.ftw-app .val-import { color: var(--red-e); } body.ftw-app .val-export { color: var(--green-e); } body.ftw-app .val-generation { color: var(--amber); } body.ftw-app .val-charging { color: var(--cyan); } -body.ftw-app .val-discharging { color: var(--cyan-dim); } +body.ftw-app .val-discharging { color: var(--energy-gives); } body.ftw-app .val-neutral { color: var(--fg); } -body.ftw-app .val-ev-charging { color: var(--green-e); } -body.ftw-app .val-ev-connected{ color: var(--amber); } +body.ftw-app .val-ev-charging { color: var(--violet); } +body.ftw-app .val-ev-connected{ color: var(--fg-dim); } /* Fuse — own row, one box per phase. */ body.ftw-app .fuse-row { @@ -814,7 +814,7 @@ body.ftw-app .fuse-phase-col .fuse-phase-w { padding: 0 4px; } body.ftw-app .fuse-phase-col .fuse-phase-w.export { - color: var(--cyan); + color: var(--green-e); } body.ftw-app .fuse-phase-box .fuse-phase-label { font-family: var(--mono); @@ -857,11 +857,9 @@ body.ftw-app .fuse-fill { background: var(--green-e); transition: width 0.3s, background 0.3s; } -body.ftw-app .fuse-phase-fill.warn, -body.ftw-app .fuse-fill.warn { background: var(--amber); } body.ftw-app .fuse-phase-fill.crit, -body.ftw-app .fuse-fill.crit { background: var(--red-e); } -body.ftw-app .fuse-phase-fill.export { background: var(--cyan); } +body.ftw-app .fuse-fill.crit { background: var(--alarm); } +body.ftw-app .fuse-phase-fill.export { background: var(--green-e); } body.ftw-app .fuse-bar { /* Fallback single-bar track (used when the site meter doesn't report per-phase amperage). Same theme-aware background as the @@ -1012,7 +1010,7 @@ body.ftw-app .history-toggle button { cursor: pointer; transition: color 220ms ease; } -body.ftw-app .history-toggle button.active { color: #0a0a0a; } +body.ftw-app .history-toggle button.active { color: var(--on-accent); } body.ftw-app .history-toggle button:not(.active):hover { color: var(--fg); } body.ftw-app .history-toggle button:focus-visible { outline: 1px solid var(--accent-e); @@ -1167,7 +1165,7 @@ body.ftw-app .mode-buttons button:hover { color: var(--fg); } body.ftw-app .mode-buttons button.active { - background: oklch(0.3 0.1 var(--accent-hue) / 0.25); + background: color-mix(in oklab, var(--accent-e) 14%, transparent); border-color: var(--accent-e); color: var(--fg); } @@ -1228,7 +1226,7 @@ body.ftw-app .plan-style-steps button:hover { color: var(--fg); } body.ftw-app .plan-style-steps button[aria-checked="true"] { - background: oklch(0.3 0.1 var(--accent-hue) / 0.35); + background: color-mix(in oklab, var(--accent-e) 18%, transparent); box-shadow: inset 0 0 0 1px var(--accent-e); color: var(--fg); } @@ -1271,7 +1269,7 @@ body.ftw-app .plan-style-note .btn-link { font-size: 13px; } body.ftw-app .plan-style-status { - color: var(--red-e); + color: var(--alarm); } /* The numbers describe the plan that is still running until the new one lands, so they step back while the box replans. */ @@ -1465,8 +1463,7 @@ body.ftw-app .plan-horizon button { body.ftw-app .plan-horizon button:hover { color: var(--fg); } body.ftw-app .plan-horizon button.active { background: var(--accent-e); - /* On-accent text is near-black per the shared design system, never white. */ - color: #0a0a0a; + color: var(--on-accent); } body.ftw-app .chart-title-row { @@ -1637,8 +1634,8 @@ body.ftw-app .live-stat-value { } body.ftw-app .live-stat-value.is-import { color: var(--red-e); } body.ftw-app .live-stat-value.is-export { color: var(--green-e); } -body.ftw-app .live-stat-value.is-charging { color: var(--accent-e); } -body.ftw-app .live-stat-value.is-discharging { color: var(--blue-e, #60a5fa); } +body.ftw-app .live-stat-value.is-charging { color: var(--cyan); } +body.ftw-app .live-stat-value.is-discharging { color: var(--energy-gives); } body.ftw-app .live-stat-value.is-neutral { color: var(--fg-dim); } /* 24 h battery + SoC history block — sits below the live power chart. @@ -1686,12 +1683,9 @@ body.ftw-app .range-buttons button:not(.active):hover { border-color: var(--fg-dim); } body.ftw-app .range-buttons button.active { - /* On-accent text per the shared design system is near-black, not white — so the - amber ON state is readable in both themes and stops looking - washed-out in light mode where the old oklch(0.15 …) barely - differed from pure black. */ + /* The ON state is ink with --on-accent text, so it reads in both themes. */ background: var(--accent-e); - color: #0a0a0a; + color: var(--on-accent); border-color: var(--accent-e); font-weight: 600; } @@ -1831,8 +1825,8 @@ body.ftw-app .plan-state-badge { text-transform: uppercase; } body.ftw-app .plan-state-badge.is-active { - border-color: color-mix(in oklch, var(--green-e) 55%, var(--line)); - color: var(--green-e); + border-color: color-mix(in oklab, var(--live) 55%, var(--line)); + color: var(--live); } body.ftw-app .plan-state-badge.is-warn { border-color: color-mix(in oklch, var(--accent-e) 60%, var(--line)); @@ -2204,20 +2198,20 @@ body.ftw-app .btn-add:disabled { opacity: 0.75; } body.ftw-app .btn-remove { - color: var(--red-e); + color: var(--alarm); flex: 0 0 auto; } body.ftw-app .btn-remove:hover { background: transparent; - border-color: var(--red-e); + border-color: var(--alarm); } body.ftw-app .settings-status { color: var(--fg-muted); font-family: var(--mono); } -body.ftw-app .settings-status.success { color: var(--green-e); } -body.ftw-app .settings-status.warning { color: var(--amber); } -body.ftw-app .settings-status.error { color: var(--red-e); } +body.ftw-app .settings-status.success { color: var(--live); } +body.ftw-app .settings-status.warning { color: var(--alarm); } +body.ftw-app .settings-status.error { color: var(--alarm); } body.ftw-app .creds-badge { border-radius: 999px; font-family: var(--mono); @@ -2226,9 +2220,9 @@ body.ftw-app .creds-badge { text-transform: uppercase; } body.ftw-app .creds-badge.creds-saved { - background: color-mix(in srgb, var(--green-e) 10%, transparent); - border-color: color-mix(in srgb, var(--green-e) 35%, transparent); - color: var(--green-e); + background: color-mix(in srgb, var(--live) 10%, transparent); + border-color: color-mix(in srgb, var(--live) 35%, transparent); + color: var(--live); } body.ftw-app .creds-badge.creds-missing { background: color-mix(in srgb, var(--accent-e) 10%, transparent); @@ -2347,8 +2341,8 @@ body.ftw-app .drv-catalog-tag { /* Four of thirty-seven have run on customer hardware. That is the difference worth showing, so it is the only tag that carries colour. */ body.ftw-app .drv-catalog-proven { - border-color: color-mix(in srgb, var(--green-e) 40%, transparent); - color: var(--green-e); + border-color: color-mix(in srgb, var(--live) 40%, transparent); + color: var(--live); } body.ftw-app .drv-catalog-unproven { border-color: color-mix(in srgb, var(--accent-e) 30%, transparent); @@ -2449,10 +2443,10 @@ body.ftw-app .drv-editor-problem { text-align: left; } body.ftw-app .drv-editor-problem:hover { color: var(--fg); } -body.ftw-app .drv-editor-error { border-left-color: var(--red-e); } +body.ftw-app .drv-editor-error { border-left-color: var(--alarm); } body.ftw-app .drv-editor-warning { border-left-color: var(--accent-e); } body.ftw-app .drv-editor-clean { - color: var(--green-e); + color: var(--live); font-family: var(--mono); font-size: 0.72rem; } @@ -2508,10 +2502,10 @@ body.ftw-app .driver-test-status { font-size: 0.75rem; } body.ftw-app .driver-test-status.ok { - color: var(--green-e); + color: var(--live); } body.ftw-app .driver-test-status.error { - color: var(--red-e); + color: var(--alarm); } body.ftw-app .driver-test-output { background: var(--ink-sunken); @@ -2565,10 +2559,10 @@ body.ftw-app .v2x-command-status { min-height: 1em; } body.ftw-app .v2x-command-status.ok { - color: var(--green-e); + color: var(--live); } body.ftw-app .v2x-command-status.error { - color: var(--red-e); + color: var(--alarm); } @media (max-width: 720px) { body.ftw-app .v2x-control-panel { @@ -2642,7 +2636,7 @@ body.ftw-app .driver-test-empty { font-size: 0.78rem; } body.ftw-app .driver-test-error { - color: var(--red-e); + color: var(--alarm); margin-top: 8px; } @@ -2985,9 +2979,6 @@ html[data-theme="light"] body.ftw-app > header .icon-btn, html[data-theme="light"] body.ftw-app > header .settings-btn { color: var(--fg); } -html[data-theme="light"] body.ftw-app .mode-buttons button.active { - background: oklch(0.75 0.14 var(--accent-hue) / 0.25); -} html[data-theme="light"] body.ftw-app .status-bar { background: var(--ink-sunken); } @@ -3072,7 +3063,7 @@ body.ftw-app .twin-profile-toggle button { body.ftw-app .twin-profile-toggle button.active { background: var(--accent-e); - color: #0a0a0a; + color: var(--on-accent); } body.ftw-app .twin-profile-toggle button:not(.active):hover { diff --git a/web/app.js b/web/app.js index 0cdfcfd97..6903f25b1 100644 --- a/web/app.js +++ b/web/app.js @@ -319,31 +319,11 @@ return Math.round(w) + " W"; } - // Fuse bar color — smooth green→yellow→orange→red gradient across - // 0 %→100 %. Anchors land at the named color at each zone - // boundary: 0 %=green, 50 %=yellow, 75 %=orange, 90 %+=red. Between - // them the hue interpolates linearly so a bar at 45 % already reads - // yellow-leaning (h ≈ 100, close to yellow's 95), not solid green — - // matches the "45 % is more towards yellow than green" spec. Oklch - // holds lightness + chroma constant so the transitions don't muddy. + // Fuse bar color. The bar is grid power, so it takes the grid colour, as + // on the phone; from 90 % it takes the alarm, because operators just need + // to see "DANGER" there. function fuseFillColor(pct) { - var c = Math.max(0, Math.min(100, pct)); - var h; - if (c < 50) { - // 0 → 50 : 150 (green) → 95 (yellow) - h = 150 - (c / 50) * (150 - 95); - } else if (c < 75) { - // 50 → 75 : 95 (yellow) → 50 (orange) - h = 95 - ((c - 50) / 25) * (95 - 50); - } else if (c < 90) { - // 75 → 90 : 50 (orange) → 22 (red) - h = 50 - ((c - 75) / 15) * (50 - 22); - } else { - // 90 → 100: solid red. Saturate rather than continue shifting - // hue — operators just need to see "DANGER", not a hue delta. - h = 22; - } - return "oklch(0.78 0.18 " + h.toFixed(1) + ")"; + return pct >= 90 ? "var(--alarm)" : "var(--red-e)"; } // Snap an axis range to "nice" round numbers. Returns { min, max, step } @@ -3442,7 +3422,7 @@ startBtn.style.cursor = "pointer"; startBtn.style.fontWeight = "600"; startBtn.style.background = "var(--accent-e)"; - startBtn.style.color = "#0a0a0a"; + startBtn.style.color = "var(--on-accent)"; function renderStartLabel() { startBtn.textContent = "Boost for " + dur.options[dur.selectedIndex].textContent; } renderStartLabel(); dur.addEventListener("change", renderStartLabel); @@ -3692,7 +3672,7 @@ startBtn.style.cursor = "pointer"; startBtn.style.fontWeight = "600"; startBtn.style.background = "var(--accent-e)"; - startBtn.style.color = "#0a0a0a"; + startBtn.style.color = "var(--on-accent)"; var stopBtn = document.createElement("button"); stopBtn.type = "button"; @@ -4376,7 +4356,7 @@ dayChips.forEach(function (chip) { chip.setAttribute("aria-pressed", chip.on ? "true" : "false"); chip.style.background = chip.on ? "var(--accent-e)" : "transparent"; - chip.style.color = chip.on ? "#0a0a0a" : "var(--text-dim)"; + chip.style.color = chip.on ? "var(--on-accent)" : "var(--text-dim)"; chip.style.borderColor = chip.on ? "var(--accent-e)" : "var(--line)"; }); } diff --git a/web/car-soc-history.js b/web/car-soc-history.js index 8898a6ef6..dba4faf64 100644 --- a/web/car-soc-history.js +++ b/web/car-soc-history.js @@ -138,7 +138,7 @@ function styles(doc) { .car-soc-history header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px;border-bottom:1px solid var(--line)} .car-soc-history h2{font-size:1.1rem;margin:0}.car-soc-history h3{font-size:.95rem;margin:0} .car-soc-history button{font:inherit;color:var(--fg);border:1px solid var(--line);border-radius:8px;padding:7px 12px;background:transparent;cursor:pointer} - .car-soc-history button[aria-pressed=true]{background:var(--accent-e);color:#0a0a0a} + .car-soc-history button[aria-pressed=true]{background:var(--accent-e);color:var(--on-accent)} .car-soc-history button:focus-visible{outline:2px solid var(--accent-e);outline-offset:3px} .car-soc-history .soc-body{padding:18px}.car-soc-history .soc-ranges{display:flex;gap:8px;margin-bottom:14px} .car-soc-history .soc-note{font-size:.82rem;color:var(--fg-muted);line-height:1.5;margin:10px 0} @@ -146,8 +146,8 @@ function styles(doc) { .car-soc-history .soc-last{font:1.3rem var(--mono);margin:8px 0} .car-soc-history svg{display:block;width:100%;height:auto;min-height:130px;overflow:visible} .car-soc-history .soc-grid{stroke:var(--line)}.car-soc-history .soc-axis{font:11px var(--mono);fill:var(--fg-muted)} - .car-soc-history .soc-dot{fill:var(--cyan)}.car-soc-history .soc-dot:focus{stroke:var(--fg);stroke-width:2} - .car-soc-history .soc-envelope{stroke:var(--cyan);stroke-width:2} + .car-soc-history .soc-dot{fill:var(--violet)}.car-soc-history .soc-dot:focus{stroke:var(--fg);stroke-width:2} + .car-soc-history .soc-envelope{stroke:var(--violet);stroke-width:2} @media(max-width:480px){.car-soc-history .soc-axis{font-size:24px}} `; } diff --git a/web/components/energy-flow-readings.js b/web/components/energy-flow-readings.js index a4741baba..a251506fc 100644 --- a/web/components/energy-flow-readings.js +++ b/web/components/energy-flow-readings.js @@ -51,9 +51,9 @@ function planetColor(role, watts, thresholdW) { } if (role === "pv") return isIdle(watts, thresholdW) ? "var(--fg-muted)" : "var(--amber)"; if (role === "battery") { - return isIdle(watts, thresholdW) ? "var(--cyan)" : watts >= 0 ? "var(--green-e)" : "var(--red-e)"; + return !isIdle(watts, thresholdW) && watts < 0 ? "var(--energy-gives)" : "var(--cyan)"; } - if (role === "ev") return isIdle(watts, thresholdW) ? "var(--white-s)" : "var(--green-e)"; + if (role === "ev") return isIdle(watts, thresholdW) ? "var(--white-s)" : "var(--violet)"; return "var(--fg)"; } @@ -88,8 +88,8 @@ export function flowReadingsFromStatus(status, opts) { { text: `↑ ${formatEnergyToday(today, "export_wh", false)}`, color: "var(--green-e)", bold: true }, ]; const batDailyParts = [ - { text: `↑ ${formatEnergyToday(today, "bat_charged_wh", false)}`, color: "var(--green-e)", bold: true }, - { text: `↓ ${formatEnergyToday(today, "bat_discharged_wh", false)}`, color: "var(--red-e)", bold: true }, + { text: `↑ ${formatEnergyToday(today, "bat_charged_wh", false)}`, color: "var(--cyan)", bold: true }, + { text: `↓ ${formatEnergyToday(today, "bat_discharged_wh", false)}`, color: "var(--energy-gives)", bold: true }, ]; const gridW = num(status && status.grid_w); diff --git a/web/components/ftw-badge.js b/web/components/ftw-badge.js index bfb4def24..18b00d900 100644 --- a/web/components/ftw-badge.js +++ b/web/components/ftw-badge.js @@ -36,24 +36,24 @@ class FtwBadge extends FtwElement { font-size: 0.65rem; } :host([status="ok"]) { - color: var(--green-e); - border-color: color-mix(in srgb, var(--green-e) 45%, transparent); - background: color-mix(in srgb, var(--green-e) 12%, var(--ink-raised)); + color: var(--live); + border-color: color-mix(in srgb, var(--live) 45%, transparent); + background: color-mix(in srgb, var(--live) 12%, var(--ink-raised)); } :host([status="warn"]) { - color: var(--amber); - border-color: color-mix(in srgb, var(--amber) 45%, transparent); - background: color-mix(in srgb, var(--amber) 12%, var(--ink-raised)); + color: var(--alarm); + border-color: color-mix(in srgb, var(--alarm) 45%, transparent); + background: color-mix(in srgb, var(--alarm) 12%, var(--ink-raised)); } :host([status="error"]) { - color: var(--red-e); - border-color: color-mix(in srgb, var(--red-e) 45%, transparent); - background: color-mix(in srgb, var(--red-e) 12%, var(--ink-raised)); + color: var(--alarm); + border-color: color-mix(in srgb, var(--alarm) 45%, transparent); + background: color-mix(in srgb, var(--alarm) 12%, var(--ink-raised)); } :host([status="info"]) { - color: var(--cyan); - border-color: color-mix(in srgb, var(--cyan) 45%, transparent); - background: color-mix(in srgb, var(--cyan) 12%, var(--ink-raised)); + color: var(--fg-dim); + border-color: color-mix(in srgb, var(--fg-dim) 45%, transparent); + background: color-mix(in srgb, var(--fg-dim) 12%, var(--ink-raised)); } `; diff --git a/web/components/ftw-battery-control.js b/web/components/ftw-battery-control.js index 866ea7601..9a897f6f3 100644 --- a/web/components/ftw-battery-control.js +++ b/web/components/ftw-battery-control.js @@ -65,7 +65,7 @@ class FtwBatteryControl extends FtwElement { .seg-btn:hover { color: var(--fg); } .seg-btn.active { background: var(--accent-e); - color: #0a0a0a; + color: var(--on-accent); } .power-wrap { @@ -119,7 +119,7 @@ class FtwBatteryControl extends FtwElement { } .chip.active { background: var(--accent-e); - color: #0a0a0a; + color: var(--on-accent); border-color: var(--accent-e); } @@ -145,9 +145,9 @@ class FtwBatteryControl extends FtwElement { } .error { - background: color-mix(in srgb, var(--red-e) 12%, transparent); - border: 1px solid var(--red-e); - color: var(--red-e); + background: color-mix(in srgb, var(--alarm) 12%, transparent); + border: 1px solid var(--alarm); + color: var(--alarm); padding: 8px 12px; border-radius: 8px; font-size: 13px; @@ -201,10 +201,10 @@ class FtwBatteryControl extends FtwElement { font-weight: 500; font-size: 14px; background: transparent; - color: var(--red-e); - border: 1px solid var(--red-e); + color: var(--alarm); + border: 1px solid var(--alarm); } - .stop-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--red-e) 12%, transparent); } + .stop-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--alarm) 12%, transparent); } .stop-btn:disabled { opacity: 0.45; cursor: not-allowed; } `; diff --git a/web/components/ftw-energy-cake.js b/web/components/ftw-energy-cake.js index 79bf78eda..894b12191 100644 --- a/web/components/ftw-energy-cake.js +++ b/web/components/ftw-energy-cake.js @@ -253,8 +253,8 @@ class FtwEnergyCake extends FtwElement { } _renderSlices(selfPct) { - // Two-slice donut. Self-consumption is the amber/accent slice - // because it's "yours"; import is the red/--red-e slice because + // Two-slice donut. Self-consumption is the ink/accent slice + // because it's "yours"; import is the grid slice because // it's the bit you'd want to shrink. const self = ringPath({ startPct: 0, diff --git a/web/components/ftw-energy-flow.js b/web/components/ftw-energy-flow.js index 5b0605035..c17acf4b0 100644 --- a/web/components/ftw-energy-flow.js +++ b/web/components/ftw-energy-flow.js @@ -44,7 +44,7 @@ // { id: "bat-main", corner: "top-right", title: "BATTERY", // kw: 2.2, toHub: false, color: "var(--cyan)", sub: "charging", soc: 78 }, // { id: "ev", corner: "bottom-right", title: "EV CHARGER", -// kw: 3.7, toHub: false, color: "var(--green-e)", sub: "charging" }, +// kw: 3.7, toHub: false, color: "var(--violet)", sub: "charging" }, // ], // }); @@ -144,7 +144,7 @@ const ANGLE_BOTTOM_CENTER = Math.PI / 2; const CORNER_PLACEHOLDER_COLOR = { "top-left": "var(--amber)", "top-right": "var(--cyan)", - "bottom-right": "var(--green-e)", + "bottom-right": "var(--violet)", "bottom-left": "var(--red-e)", }; const CORNER_PLACEHOLDER_ROLE = { @@ -1167,8 +1167,8 @@ class FtwEnergyFlow extends FtwElement { - - + + @@ -1568,7 +1568,7 @@ function renderCircleNode({ pos, title, nameLabel, value, sub, color, soc, // - "⚠ " prefix when the vehicle reading is stale (driver lost // contact with the car for more than its stale_after_s window). // Used to be "★ " — but "★" universally reads as "favourite", - // the opposite of "degraded". A warning glyph + amber color + // the opposite of "degraded". A warning glyph in --fg-dim // matches the rest of the app's stale signalling. // When a charge-limit is also known, render as "24/50%" — no spaces // around the slash, the format reads as "current of limit". @@ -1584,7 +1584,7 @@ function renderCircleNode({ pos, title, nameLabel, value, sub, color, soc, const socBody = showLimit ? `${socPrefix}${Math.round(soc)}/${Math.round(chargeLimit)}%` : `${socPrefix}${Math.round(soc)}%`; - const fillColor = socStale ? "var(--stat-warn, #f59e0b)" : "var(--cyan)"; + const fillColor = socStale ? "var(--fg-dim)" : "var(--cyan)"; const titleAttr = socStale ? ` data-tooltip="Reading is stale (no recent contact with vehicle)"` : ""; socText = `${aggPrefix}${stalePrefix}${socBody}`; @@ -1621,14 +1621,15 @@ function renderCircleNode({ pos, title, nameLabel, value, sub, color, soc, `; } -// The overview stays quiet while FTW is in control. Core's warning draws an -// amber triangle and its alarm a red disc; the whole bubble stays the target. +// The overview stays quiet while FTW is in control. Core's warning draws a +// triangle and its alarm a disc, both in the alarm colour; the whole bubble +// stays the target. function renderControlMark(mark, x, y, r) { const alarm = mark.tone === 'alarm'; const size = Math.max(7, Math.min(11, r * 0.15)); const glyph = alarm - ? '' - : ''; + ? '' + : ''; return ` ${escapeXml(mark.label)} diff --git a/web/components/ftw-history-card.js b/web/components/ftw-history-card.js index 662db8719..cb42c32d6 100644 --- a/web/components/ftw-history-card.js +++ b/web/components/ftw-history-card.js @@ -44,7 +44,7 @@ const DEFAULT_ACCENT = { load: "var(--fg)", pv: "var(--amber)", bat_charged: "var(--cyan)", - bat_discharged:"var(--cyan-dim, var(--cyan))", + bat_discharged:"var(--energy-gives)", }; // Several history cards often flip Week/Month together. Share the @@ -177,7 +177,7 @@ class FtwHistoryCard extends FtwElement { cursor: pointer; transition: color 220ms ease; } - .toggle button.active { color: #0a0a0a; } + .toggle button.active { color: var(--on-accent); } .toggle button:not(.active):hover { color: var(--fg); } .toggle button:focus-visible { outline: 1px solid var(--accent-e); diff --git a/web/components/ftw-notif-history.js b/web/components/ftw-notif-history.js index ea2dddf99..808d1fe82 100644 --- a/web/components/ftw-notif-history.js +++ b/web/components/ftw-notif-history.js @@ -72,7 +72,7 @@ export class FtwNotifHistory extends FtwElement { .dot { position: absolute; top: 2px; right: 2px; min-width: 14px; height: 14px; padding: 0 3px; - border-radius: 10px; background: var(--red-e, #e57373); color: var(--on-accent, #0a0a0a); + border-radius: 10px; background: var(--alarm, #e57373); color: var(--on-accent, #0a0a0a); font-size: 10px; font-weight: 700; line-height: 14px; text-align: center; } @@ -89,12 +89,12 @@ export class FtwNotifHistory extends FtwElement { position: sticky; top: 0; background: var(--ink-raised, #1a1a1a); font-weight: 600; } - ftw-modal tr.sent td .status-cell { color: var(--green-e, #7dd17d); } - ftw-modal tr.failed td .status-cell { color: var(--red-e, #e57373); } + ftw-modal tr.sent td .status-cell { color: var(--live, #7dd17d); } + ftw-modal tr.failed td .status-cell { color: var(--alarm, #e57373); } ftw-modal td.body { color: var(--fg-dim, #a0a0a0); } ftw-modal .empty { padding: 24px; text-align: center; color: var(--fg-muted, #858585); } ftw-modal .scroll { max-height: 60vh; overflow: auto; } - ftw-modal .error-text { color: var(--red-e, #e57373); font-family: monospace; } + ftw-modal .error-text { color: var(--alarm, #e57373); font-family: monospace; } ftw-modal .refresh-btn { background: var(--ink-raised, #222); color: var(--fg, #eee); border: 1px solid var(--line, #333); border-radius: 4px; diff --git a/web/components/ftw-price-chart.js b/web/components/ftw-price-chart.js index 2042b2fe5..3bcdd679d 100644 --- a/web/components/ftw-price-chart.js +++ b/web/components/ftw-price-chart.js @@ -142,7 +142,7 @@ class FtwPriceChart extends FtwElement { cursor: pointer; transition: color 220ms ease; } - .toggle button.active { color: #0a0a0a; } + .toggle button.active { color: var(--on-accent); } .toggle button:not(.active):hover { color: var(--fg); } .chart-wrap { @@ -196,8 +196,6 @@ class FtwPriceChart extends FtwElement { font-size: 14px; font-weight: 600; } - .tip-price.peak { color: var(--red-e); } - .tip-price.low { color: var(--green-e); } /* Component breakdown under the total, so the tooltip answers "why is it that much?" without a trip to the plan page. */ .tip-parts { @@ -314,7 +312,7 @@ class FtwPriceChart extends FtwElement { } .compact-low strong { margin-top: 3px; - color: var(--green-e); + color: var(--fg); font-family: var(--mono); font-size: 1rem; font-variant-numeric: tabular-nums; @@ -358,11 +356,12 @@ class FtwPriceChart extends FtwElement { /* Bars rise from zero like the full chart's, so both views teach one reading: height is price. The dotted line is the average ahead — a bar's top is read against it, and colour only reinforces what the - geometry already says, so the strip survives greyscale. */ + geometry already says, so the strip survives greyscale. A price is + a level, not a state: ink, the dearer the stronger. */ .compact-profile rect { opacity: 0.85; } - .compact-profile rect.is-dear { fill: var(--red-e); } - .compact-profile rect.is-cheap { fill: var(--green-e); } - .compact-profile rect.is-flat { fill: var(--fg-muted); } + .compact-profile rect.is-dear { fill: color-mix(in srgb, var(--fg) 80%, transparent); } + .compact-profile rect.is-cheap { fill: color-mix(in srgb, var(--fg) 32%, transparent); } + .compact-profile rect.is-flat { fill: color-mix(in srgb, var(--fg) 50%, transparent); } .compact-profile rect.is-negative { fill: var(--yellow); } .compact-profile rect.is-current { fill: var(--accent-e); @@ -392,7 +391,7 @@ class FtwPriceChart extends FtwElement { font-size: 10px; } .compact-stale { - color: var(--amber); + color: var(--fg-dim); } .compact-empty { display: flex; @@ -937,19 +936,17 @@ class FtwPriceChart extends FtwElement { // to zero). Either way, height is the absolute distance. const top = p < 0 ? zeroY : y; const h = Math.max(1, Math.abs(zeroY - y)); - const dev = (p - meanP) / Math.max(1, maxP - minP); + const level = Math.min(1, Math.max(0, (p - minP) / Math.max(1, maxP - minP))); // Negative slots are flagged yellow regardless of where they // land in the lo/hi ranking — "they pay you to take it" reads // as a different category, not just "the cheapest hour today". + // Every other slot is ink by level, the dearer the stronger. const fill = p < 0 ? "var(--yellow)" - : i === lo ? "var(--green-e)" - : i === hi ? "var(--red-e)" - : (p < meanP ? `color-mix(in srgb, var(--green-e) ${Math.round(40 - dev * 40)}%, transparent)` - : `color-mix(in srgb, var(--red-e) ${Math.round(40 + dev * 40)}%, transparent)`); + : `color-mix(in srgb, var(--fg) ${Math.round(32 + level * 48)}%, transparent)`; const stroke = (i === lo || i === hi) ? "currentColor" : "none"; return ``; }).join(""); @@ -1021,9 +1018,9 @@ class FtwPriceChart extends FtwElement { const ty = pad.t + 6; dayBoundary = ` + stroke="var(--fg-dim)" stroke-width="1.5" opacity="0.8" /> TOMORROW `; @@ -1062,8 +1059,8 @@ class FtwPriceChart extends FtwElement { ${bars} ${dayBoundary} ${nowMarker} - ${markBar(lo, "var(--green-e)", "▼")} - ${markBar(hi, "var(--red-e)", "▲")} + ${markBar(lo, "var(--fg-dim)", "▼")} + ${markBar(hi, "var(--fg)", "▲")} ${xTicks.join("")} ${yLabels} 0, red when saved<0, neutral within tiny - // dead zone (avoids flicker when the running total bobs across 0). + // Money is ink, not a state: full ink when saved or lost, dim within a + // tiny dead zone (avoids flicker when the running total bobs across 0). const deadZoneSek = 0.5; const color = Math.abs(savedSek) < deadZoneSek ? "var(--fg-dim)" - : (savedSek > 0 ? "var(--green-e)" : "var(--red-e)"); + : "var(--fg)"; this.style.setProperty('--ftw-savings-color', color); // Sub-line: actual + no-PV/no-battery baseline in SEK. Gives the diff --git a/web/components/theme.css b/web/components/theme.css index 975776ab2..08e9a9a36 100644 --- a/web/components/theme.css +++ b/web/components/theme.css @@ -14,42 +14,52 @@ */ :root { - /* ----- Terminal Native surface roles: dark (default). ----- */ - --ink: #0d0d0d; - --ink-sunken: #101010; - --ink-raised: #161616; - --ink-elevated: #1e1e1e; - --line: #2a2a2a; - --line-soft: #222222; - --fg: #e8e8e8; - --fg-dim: #a0a0a0; - --fg-muted: #858585; - --fg-label: #d8d8d8; - --on-accent: #0a0a0a; + /* ----- Surface roles, from the iOS app's palette: dark (default). ----- */ + --ink: #05080f; + --ink-sunken: #03060c; + --ink-raised: #0b111c; + --ink-elevated: #111a29; + --line: #1b2433; + --line-soft: #141c29; + --fg: #eef3ff; + --fg-dim: #9aa5b8; + --fg-muted: #727d90; + --fg-label: #c4ccda; + --on-accent: var(--ink); - --amber: oklch(0.82 0.18 75); - --amber-d: oklch(0.65 0.14 75); - --red-e: oklch(0.72 0.18 20); - --green-e: oklch(0.78 0.16 150); - --cyan: oklch(0.82 0.14 210); - --cyan-dim: oklch(0.65 0.10 210); - --violet: oklch(0.80 0.14 300); + /* Colour is energy. Each kind has one hue, the battery two: --cyan + stores and --energy-gives gives. The grid is one hue both ways; the + sign and the word say buying or selling. */ + --amber: #ffe14d; + --amber-d: #ffe14d; + --red-e: #ff5fa8; + --green-e: #ff5fa8; + --cyan: #18d9ff; + --cyan-dim: #0f9db9; + --violet: #b69cff; + --energy-gives: #ffb000; --white-s: var(--fg); - --accent-hue: 65; - --accent-e: oklch(0.82 0.16 var(--accent-hue)); + /* States, never levels: live or confirmed, and refused, failed or + blocked. A warning that needs action takes --alarm. */ + --live: #83f52c; + --alarm: #ff453a; + + /* The interface is ink: no orange accent. */ + --accent-e: var(--fg); /* Compatibility bridge for legacy light-DOM CSS and /setup. New work uses the canonical roles above; these aliases keep older surfaces in - the same theme without duplicating palette values. */ + the same theme without duplicating palette values. --green and --red + are states; energy uses the -e names. */ --bg: var(--ink); --surface: var(--ink-raised); --surface2: var(--ink-sunken); --border: var(--line); --text: var(--fg); --text-dim: var(--fg-dim); - --green: var(--green-e); - --red: var(--red-e); + --green: var(--live); + --red: var(--alarm); --yellow: var(--amber); --blue: var(--cyan); --accent: var(--accent-e); @@ -57,22 +67,19 @@ /* Hero-specific surfaces. Extracted as tokens so the flow hero adapts cleanly to the light theme without duplicating the SVG render path. */ - --hero-bg-top: #1a1a1a; - --hero-bg-bot: #111111; - --hero-glow-a: oklch(0.4 0.15 var(--accent-hue) / 0.08); - --hero-line-base: #2a2a2a; - --hero-box-fill: rgb(22 22 22 / 95%); - --hero-box-border: #303030; - --hero-house-fill: #1c1c1c; - --hero-house-stroke: oklch(0.7 0.14 var(--accent-hue)); - --hero-house-ring: oklch(0.55 0.1 var(--accent-hue)); - --hero-load-text: oklch(0.9 0.08 var(--accent-hue)); - /* Labels / subs inside the energy-flow bubbles — pulled up to match - the brighter --fg-label token used by card-labels so the bubble - text isn't noticeably dimmer than every other label on the page. */ - --hero-label-text: #d8d8d8; - --hero-sub-text: #b8b8b8; - --hero-soc-track: #2a2a2a; + --hero-bg-top: var(--ink-raised); + --hero-bg-bot: var(--ink); + --hero-glow-a: transparent; + --hero-line-base: var(--line); + --hero-box-fill: rgb(11 17 28 / 95%); + --hero-box-border: var(--line); + --hero-house-fill: var(--ink-raised); + --hero-house-stroke: var(--fg); + --hero-house-ring: var(--fg-muted); + --hero-load-text: var(--fg); + --hero-label-text: var(--fg-label); + --hero-sub-text: var(--fg-dim); + --hero-soc-track: var(--line-soft); /* No external font CDN — all fallbacks are either shipped with the OS (system-ui, Segoe UI, Roboto, Helvetica Neue) or resolved by @@ -94,43 +101,30 @@ --card-pad-tight: 12px 14px; } -/* ----- Light application theme. Compatibility aliases above follow these - canonical overrides automatically. ----- */ +/* ----- Light application theme. Compatibility aliases and hero tokens + above follow these canonical overrides automatically. ----- */ html[data-theme="light"] { - --ink: #f4f4f2; - --ink-sunken: #ecece8; - --ink-raised: #fafaf8; + --ink: #f5f6f8; + --ink-sunken: #eceef2; + --ink-raised: #ffffff; --ink-elevated: #ffffff; - --line: #cecec7; - --line-soft: #ddddd7; - --fg: #191919; - --fg-dim: #4f4f4b; - --fg-muted: #686862; - --fg-label: #4f4f4b; + --line: #dce0e7; + --line-soft: #e7eaf0; + --fg: #0a0f1a; + --fg-dim: #545e70; + --fg-muted: #677184; + --fg-label: #2e3646; - /* Functional colours pulled ~15% darker so they keep contrast on paper - without turning neon. Accent hue still drives --accent-e. */ - --amber: oklch(0.68 0.17 75); - --amber-d: oklch(0.55 0.14 75); - --red-e: oklch(0.55 0.20 20); - --green-e: oklch(0.58 0.18 150); - --cyan: oklch(0.58 0.14 210); - --cyan-dim: oklch(0.48 0.10 210); - --violet: oklch(0.55 0.14 300); - --accent-e: oklch(0.68 0.16 var(--accent-hue)); + --amber: #8a6c00; + --amber-d: #8a6c00; + --red-e: #c2186f; + --green-e: #c2186f; + --cyan: #00739a; + --cyan-dim: #3d8fae; + --violet: #6a48d8; + --energy-gives: #a35700; + --live: #2f7a00; + --alarm: #d70015; - /* Hero: neutral paper surfaces with semantic energy colors intact. */ - --hero-bg-top: #fafaf8; - --hero-bg-bot: #ecece8; - --hero-glow-a: oklch(0.72 0.14 var(--accent-hue) / 0.10); - --hero-line-base: #cecec7; - --hero-box-fill: rgb(255 255 255 / 96%); - --hero-box-border: #cecec7; - --hero-house-fill: #fafaf8; - --hero-house-stroke: oklch(0.55 0.14 var(--accent-hue)); - --hero-house-ring: oklch(0.72 0.10 var(--accent-hue)); - --hero-load-text: oklch(0.40 0.18 var(--accent-hue)); - --hero-label-text: #4f4f4b; - --hero-sub-text: #686862; - --hero-soc-track: #ddddd7; + --hero-box-fill: rgb(255 255 255 / 96%); } diff --git a/web/diagnostics-modal.js b/web/diagnostics-modal.js index f80a09253..f5162984d 100644 --- a/web/diagnostics-modal.js +++ b/web/diagnostics-modal.js @@ -78,18 +78,18 @@ ".ftw-diag-status-pill{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:0.7rem;letter-spacing:0.12em;text-transform:uppercase;padding:3px 10px;border:1px solid var(--line);border-radius:999px;color:var(--fg-dim);}", ".ftw-diag-status-pill::before{content:'';width:6px;height:6px;border-radius:999px;background:var(--line);}", ".ftw-diag-status-pill.ftw-diag-status-ok{color:var(--accent-e);border-color:var(--accent-e);}", - ".ftw-diag-status-pill.ftw-diag-status-ok::before{background:var(--green-e);box-shadow:0 0 10px var(--green-e);}", + ".ftw-diag-status-pill.ftw-diag-status-ok::before{background:var(--live);box-shadow:0 0 10px var(--live);}", ".ftw-diag-status-pill.ftw-diag-status-degraded{color:var(--accent-e);border-color:var(--accent-e);}", ".ftw-diag-status-pill.ftw-diag-status-degraded::before{background:var(--accent-e);box-shadow:0 0 10px var(--accent-e);}", - ".ftw-diag-status-pill.ftw-diag-status-offline{color:var(--red-e);border-color:var(--red-e);}", - ".ftw-diag-status-pill.ftw-diag-status-offline::before{background:var(--red-e);box-shadow:0 0 10px var(--red-e);}", + ".ftw-diag-status-pill.ftw-diag-status-offline{color:var(--alarm);border-color:var(--alarm);}", + ".ftw-diag-status-pill.ftw-diag-status-offline::before{background:var(--alarm);box-shadow:0 0 10px var(--alarm);}", ".ftw-diag-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}", // Ghost button per the shared design system: transparent bg, hover changes ONLY // the border colour (no bg or text-colour shift). ".ftw-diag-btn{font-family:var(--sans);font-size:0.78rem;font-weight:500;letter-spacing:0.02em;padding:8px 14px;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--fg);cursor:pointer;transition:border-color 120ms ease;}", ".ftw-diag-btn:hover{border-color:var(--fg-dim);}", - // Primary CTA: amber bg, near-black text, lift on hover (no colour shift). - ".ftw-diag-btn-primary{background:var(--accent-e);color:#0a0a0a;border-color:var(--accent-e);}", + // Primary CTA: accent bg, on-accent text, lift on hover (no colour shift). + ".ftw-diag-btn-primary{background:var(--accent-e);color:var(--on-accent);border-color:var(--accent-e);}", ".ftw-diag-btn-primary:hover{border-color:var(--accent-e);transform:translateY(-1px);}", // Close glyph: bare ghost, hover lifts to fg. ".ftw-diag-close{font-size:1.4rem;line-height:1;background:transparent;border:none;color:var(--fg-muted);cursor:pointer;padding:4px 8px;}", @@ -102,7 +102,7 @@ ".ftw-diag-kv{display:grid;grid-template-columns:140px 1fr;gap:6px 14px;font-family:var(--mono);font-size:0.84rem;font-variant-numeric:tabular-nums;}", ".ftw-diag-kv .k{color:var(--fg-muted);}", ".ftw-diag-kv .v{color:var(--fg);word-break:break-all;}", - ".ftw-diag-kv .v.err{color:var(--red-e);}", + ".ftw-diag-kv .v.err{color:var(--alarm);}", // Reading rows: type label, raw, smoothed, soc/age. ".ftw-diag-readings{display:grid;gap:2px;}", ".ftw-diag-reading{display:grid;grid-template-columns:80px 1fr 1fr 110px;gap:10px;font-family:var(--mono);font-size:0.84rem;font-variant-numeric:tabular-nums;padding:5px 0;border-bottom:1px solid var(--line-soft);}", @@ -110,7 +110,7 @@ ".ftw-diag-reading .label{color:var(--accent-e);text-transform:uppercase;letter-spacing:0.14em;font-size:0.68rem;align-self:center;}", ".ftw-diag-reading .num{color:var(--fg);}", ".ftw-diag-reading .num-dim{color:var(--fg-dim);}", - ".ftw-diag-reading.stale .num,.ftw-diag-reading.stale .num-dim,.ftw-diag-reading.stale .meta{color:var(--red-e);}", + ".ftw-diag-reading.stale .num,.ftw-diag-reading.stale .num-dim,.ftw-diag-reading.stale .meta{color:var(--alarm);}", ".ftw-diag-reading .meta{color:var(--fg-muted);text-align:right;}", // Metrics list: name dim, value strong. ".ftw-diag-metrics{display:grid;grid-template-columns:1fr auto 1fr auto;gap:4px 18px;font-family:var(--mono);font-size:0.82rem;font-variant-numeric:tabular-nums;}", @@ -122,9 +122,9 @@ ".ftw-diag-log-DEBUG{color:var(--fg-muted);}", ".ftw-diag-log-INFO{color:var(--fg);}", ".ftw-diag-log-WARN{color:var(--accent-e);}", - ".ftw-diag-log-ERROR{color:var(--red-e);}", + ".ftw-diag-log-ERROR{color:var(--alarm);}", ".ftw-diag-empty{color:var(--fg-muted);font-family:var(--mono);font-size:0.84rem;padding:14px 0;text-align:center;}", - ".ftw-diag-error{color:var(--red-e);font-family:var(--mono);font-size:0.82rem;}", + ".ftw-diag-error{color:var(--alarm);font-family:var(--mono);font-size:0.82rem;}", ".ftw-diag-job{position:fixed;inset:0;background:rgba(0,0,0,0.62);z-index:9100;display:flex;align-items:center;justify-content:center;}", ".ftw-diag-job-card{width:min(420px,90vw);background:var(--ink-raised);border:1px solid var(--line);border-radius:10px;padding:18px;text-align:center;color:var(--fg);}", ".ftw-diag-job-spinner{display:inline-block;width:22px;height:22px;border:2px solid var(--line);border-top-color:var(--accent-e);border-radius:50%;animation:ftwDiagSpin 0.9s linear infinite;margin-bottom:10px;}", @@ -132,7 +132,7 @@ ".ftw-diag-job-title{font-family:var(--mono);font-size:0.85rem;letter-spacing:0.12em;text-transform:uppercase;color:var(--accent-e);margin-bottom:8px;}", ".ftw-diag-job-msg{font-family:var(--sans);font-size:0.9rem;color:var(--fg);margin-bottom:6px;}", ".ftw-diag-job-meta{font-family:var(--mono);font-size:0.78rem;color:var(--fg-dim);}", - ".ftw-diag-job-error{color:var(--red-e);font-family:var(--mono);font-size:0.82rem;margin-top:10px;}", + ".ftw-diag-job-error{color:var(--alarm);font-family:var(--mono);font-size:0.82rem;margin-top:10px;}", ".ftw-diag-job-actions{display:flex;justify-content:center;gap:8px;margin-top:14px;}", ".ftw-diag-review{position:fixed;inset:0;background:rgba(0,0,0,0.68);z-index:9200;display:flex;align-items:center;justify-content:center;}", ".ftw-diag-review-card{width:min(680px,94vw);max-height:90vh;overflow:auto;background:var(--ink-raised);border:1px solid var(--line);border-radius:10px;padding:18px;color:var(--fg);}", diff --git a/web/header-status-marks.test.mjs b/web/header-status-marks.test.mjs index 2653d9c50..04f599b34 100644 --- a/web/header-status-marks.test.mjs +++ b/web/header-status-marks.test.mjs @@ -188,10 +188,10 @@ describe("header status marks", () => { it("takes its three colours from the themed palette, not hardcoded hex", () => { const styles = new FtwUpdateBadge()._styles(); - assert.match(styles, /\.mark\.update \{[^}]*color: var\(--cyan/); - assert.match(styles, /\.mark\.warning \{[^}]*color: var\(--amber/); - assert.match(styles, /\.mark\.ok \{[^}]*color: var\(--green-e/); - assert.match(styles, /\.mark\.offline \{[^}]*color: var\(--red-e/); + assert.match(styles, /\.mark\.update \{[^}]*color: var\(--fg,/); + assert.match(styles, /\.mark\.warning \{[^}]*color: var\(--fg-dim/); + assert.match(styles, /\.mark\.ok \{[^}]*color: var\(--live/); + assert.match(styles, /\.mark\.offline \{[^}]*color: var\(--alarm/); }); }); diff --git a/web/history-migration.js b/web/history-migration.js index 4dad1c3b5..6f676d22c 100644 --- a/web/history-migration.js +++ b/web/history-migration.js @@ -117,7 +117,7 @@ export function updateMigrationBanner(health) { banner.className = "storage-banner"; banner.setAttribute("aria-label", "History import"); banner.style.cssText = "display:block;text-align:left;padding:16px 24px"; - banner.innerHTML = '

'; + banner.innerHTML = '

'; main.parentNode.insertBefore(banner, main); } for (const key of ["title", "description", "step", "metrics", "sizeNote", "details", "coverage", "activity", "error", "guidance"]) { diff --git a/web/lan-auth.js b/web/lan-auth.js index 14731bf5d..8d192c5f5 100644 --- a/web/lan-auth.js +++ b/web/lan-auth.js @@ -64,7 +64,7 @@ '

This box asks for the house password before settings and other writes. Live numbers stay visible.

' + '' + '' + - '

' + + '

' + '