From 21a54c4cfa02d0aa72eb138cb1e97aaa05d60208 Mon Sep 17 00:00:00 2001 From: tajniak81 <13187254+tajniak81@users.noreply.github.com> Date: Tue, 1 Sep 2026 11:52:04 +0200 Subject: [PATCH] The bolt in the list takes the colour the badge already had MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every charger in "Your chargers" drew its bolt in the same green, state or no state โ€” the list's one visual signal said nothing. It now takes the green and amber the information card's badges use, off the same live map, so the list answers "which one is up?" without opening anything. A charger the service is silent about draws muted rather than green: a green bolt for an unknown charger is a claim. The icon carries a title as well, so the state is not left to colour alone. Co-Authored-By: Claude Opus 5 --- Web App/web/src/views/Charging.vue | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Web App/web/src/views/Charging.vue b/Web App/web/src/views/Charging.vue index fa618fb..0f09aa0 100644 --- a/Web App/web/src/views/Charging.vue +++ b/Web App/web/src/views/Charging.vue @@ -173,6 +173,24 @@ function sourcesLabel(sources) { }).join(" ยท "); } +// The colour the list icon is drawn in: the same green and amber the badges in +// the information card use, so the list can be read at a glance without opening +// anything. A charger the service says nothing about stays muted โ€” unknown is +// not offline, and a green bolt for it would be a claim. +function homeChargerStatusLabel(c) { + const online = liveFor(c)?.online; + if (online === true) return t("charging.info.online"); + if (online === false) return t("charging.info.offline"); + return ""; +} + +function homeChargerTone(c) { + const online = liveFor(c)?.online; + if (online === true) return TONE.good.fg; + if (online === false) return TONE.due.fg; + return "var(--text-muted)"; +} + // The OCPP connector state as the *service* sees it โ€” the cloud's own reading, // not our CSMS's. It words it when it can and numbers it when it cannot. function ocppStatusLabel(live) { @@ -646,8 +664,9 @@ onMounted(async () => { - + {{ c.name }}