feat(frontend): always-visible gun bays, idle/plugged/charging lamp language, self-service password
- Control renders every gun declared in the chargers registry, even when the charger is offline or has not reported that connector yet (state shows Offline / No status yet in gray) - owner-specified state language: gray = idle, pulsing blue = cable in the socket (Preparing), green = charging; suspended/finishing = steady blue; fault = red - POST /api/me/password (requires current password) + /account page, username in the topbar links to it - smoke test: 58 checks (password change round-trip incl. old-password invalidation)
This commit is contained in:
+27
-8
@@ -14,7 +14,8 @@
|
||||
--line: #d8ddda;
|
||||
--copper: #b25c28; /* busbar copper — the accent */
|
||||
--copper-deep: #8f4a20;
|
||||
--live: #178a5c; /* DC-on green */
|
||||
--live: #178a5c; /* DC-on green: charging */
|
||||
--blue: #2160c4; /* plugged-in blue */
|
||||
--amber: #c07f00;
|
||||
--red: #bf3527;
|
||||
--lamp-off: #c4ccc8;
|
||||
@@ -35,6 +36,7 @@
|
||||
--copper: #d07a3e;
|
||||
--copper-deep: #b25c28;
|
||||
--live: #2fae7c;
|
||||
--blue: #4f8ee8;
|
||||
--amber: #d99a1b;
|
||||
--red: #d8503f;
|
||||
--lamp-off: #39433f;
|
||||
@@ -90,13 +92,23 @@ button, input, select { font: inherit; color: inherit; }
|
||||
background: radial-gradient(circle at 35% 30%, #ff9d8f, var(--red) 70%);
|
||||
box-shadow: inset 0 0 2px rgb(0 0 0 / 0.25), 0 0 8px color-mix(in srgb, var(--red) 55%, transparent);
|
||||
}
|
||||
.lamp--pulse { animation: lamp-pulse 1.6s ease-in-out infinite; }
|
||||
@keyframes lamp-pulse {
|
||||
0%, 100% { box-shadow: inset 0 0 2px rgb(0 0 0 / 0.25), 0 0 4px color-mix(in srgb, var(--live) 40%, transparent); }
|
||||
50% { box-shadow: inset 0 0 2px rgb(0 0 0 / 0.25), 0 0 14px color-mix(in srgb, var(--live) 85%, transparent); }
|
||||
.lamp--blue {
|
||||
background: radial-gradient(circle at 35% 30%, #9ec4ff, var(--blue) 70%);
|
||||
box-shadow: inset 0 0 2px rgb(0 0 0 / 0.25), 0 0 8px color-mix(in srgb, var(--blue) 55%, transparent);
|
||||
}
|
||||
.lamp--pulse-blue { animation: lamp-pulse-blue 1.5s ease-in-out infinite; }
|
||||
@keyframes lamp-pulse-blue {
|
||||
0%, 100% {
|
||||
box-shadow: inset 0 0 2px rgb(0 0 0 / 0.25), 0 0 3px color-mix(in srgb, var(--blue) 35%, transparent);
|
||||
filter: brightness(0.85);
|
||||
}
|
||||
50% {
|
||||
box-shadow: inset 0 0 2px rgb(0 0 0 / 0.25), 0 0 15px color-mix(in srgb, var(--blue) 90%, transparent);
|
||||
filter: brightness(1.15);
|
||||
}
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.lamp--pulse { animation: none; }
|
||||
.lamp--pulse-blue { animation: none; }
|
||||
* { transition: none !important; }
|
||||
}
|
||||
|
||||
@@ -140,7 +152,12 @@ button, input, select { font: inherit; color: inherit; }
|
||||
}
|
||||
|
||||
.topbar__user { display: flex; align-items: center; gap: 10px; }
|
||||
.topbar__who { font-family: var(--font-mono); font-size: 13px; color: var(--ink-dim); }
|
||||
.topbar__who {
|
||||
font-family: var(--font-mono); font-size: 13px; color: var(--ink-dim);
|
||||
text-decoration: none; padding: 4px 8px; border-radius: 6px;
|
||||
}
|
||||
.topbar__who:hover { color: var(--ink); background: var(--panel-inset); }
|
||||
.topbar__who.active { color: var(--copper-deep); }
|
||||
|
||||
.alert {
|
||||
display: flex; align-items: center; gap: 10px;
|
||||
@@ -263,7 +280,9 @@ button, input, select { font: inherit; color: inherit; }
|
||||
border: 1px solid var(--line);
|
||||
}
|
||||
.chip--live, .chip--charging { background: color-mix(in srgb, var(--live) 14%, transparent); color: var(--live); border-color: color-mix(in srgb, var(--live) 40%, transparent); }
|
||||
.chip--preparing, .chip--finishing { background: color-mix(in srgb, var(--amber) 14%, transparent); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
|
||||
.chip--plugged { background: color-mix(in srgb, var(--blue) 13%, transparent); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, transparent); }
|
||||
.chip--idle { /* the quiet gray default */ }
|
||||
.chip--offline { opacity: 0.7; }
|
||||
.chip--faulted, .chip--unavailable { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
|
||||
.chip--card { background: color-mix(in srgb, var(--copper) 13%, transparent); color: var(--copper-deep); border-color: color-mix(in srgb, var(--copper) 40%, transparent); }
|
||||
.chip--app { background: color-mix(in srgb, var(--live) 12%, transparent); color: var(--live); border-color: color-mix(in srgb, var(--live) 35%, transparent); }
|
||||
|
||||
Reference in New Issue
Block a user