From 019c28db855a854f536703dc10701b0202cd2d24 Mon Sep 17 00:00:00 2001 From: tajniak81 <13187254+tajniak81@users.noreply.github.com> Date: Tue, 1 Sep 2026 13:01:09 +0200 Subject: [PATCH] The card is about the charger you picked, not all of them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Charger information stacked every imported charger, so the list beside it selected one and the card ignored the choice — with two chargers the page said everything twice and the picking meant nothing. It now shows the selected one alone, and falls back to the first until something is picked: a card that stays blank until clicked is a worse greeting than the charger most people have only one of. The per-block ring goes with it. Highlighting the selection inside a card that shows nothing else is a distinction without a second thing to draw. Co-Authored-By: Claude Opus 5 --- Web App/web/src/views/Charging.vue | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/Web App/web/src/views/Charging.vue b/Web App/web/src/views/Charging.vue index f645971..bdc4689 100644 --- a/Web App/web/src/views/Charging.vue +++ b/Web App/web/src/views/Charging.vue @@ -218,6 +218,14 @@ async function loadHomeChargers() { } } +// The card shows one charger: whichever is picked in the list beside it. Until +// something is picked that is the first one — a card that says nothing until +// clicked would be a worse first impression than the charger most people have +// only one of. +const selectedHomeCharger = computed( + () => homeChargers.value.find((c) => c.id === selected.value) || homeChargers.value[0] || null +); + // A charger picked here becomes the one the control card drives. function selectHomeCharger(c) { selected.value = c.id; @@ -606,30 +614,26 @@ onMounted(async () => { -
+ +
-

{{ c.name }}

+

{{ selectedHomeCharger.name }}

- + {{ t("charging.info.online") }} - + {{ t("charging.info.offline") }} - - {{ providerLabel(c.provider) }} + + {{ providerLabel(selectedHomeCharger.provider) }}
-