From 06d32ae9cbd3c2972fe7013fcb78675cd0befdcb Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 25 Mar 2026 21:36:53 +0100 Subject: [PATCH] refactor(webui): use useChargingStations composable in ChargingStationsView --- ui/web/src/views/ChargingStationsView.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/web/src/views/ChargingStationsView.vue b/ui/web/src/views/ChargingStationsView.vue index 4128c09f..86e0e996 100644 --- a/ui/web/src/views/ChargingStationsView.vue +++ b/ui/web/src/views/ChargingStationsView.vue @@ -136,6 +136,7 @@ import { getLocalStorage, randomUUID, setToLocalStorage, + useChargingStations, useUIClient, } from '@/composables' @@ -179,7 +180,7 @@ const clearToggleButtons = (): void => { const app = getCurrentInstance() -const chargingStationsRef = app?.appContext.config.globalProperties.$chargingStations +const chargingStationsRef = useChargingStations() if (chargingStationsRef != null) { watch(chargingStationsRef, () => { state.value.renderChargingStations = randomUUID() @@ -193,8 +194,8 @@ const clearTemplates = (): void => { } const clearChargingStations = (): void => { - if (app != null) { - app.appContext.config.globalProperties.$chargingStations!.value = [] + if (chargingStationsRef != null) { + chargingStationsRef.value = [] } } @@ -249,9 +250,8 @@ const getChargingStations = (): void => { uiClient .listChargingStations() .then((response: ResponsePayload) => { - if (app != null) { - app.appContext.config.globalProperties.$chargingStations!.value = - response.chargingStations as ChargingStationData[] + if (chargingStationsRef != null) { + chargingStationsRef.value = response.chargingStations as ChargingStationData[] } return undefined }) -- 2.53.0