From d64ea57bcb4fd9151a43b16ff4d4b5ed059ad1d7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 1 Mar 2024 16:02:32 +0100 Subject: [PATCH] fix(ui): refresh add charging stations button on UI server switch MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- ui/web/src/composables/UIClient.ts | 2 +- ui/web/src/views/ChargingStationsView.vue | 44 +++++++++++++++-------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/ui/web/src/composables/UIClient.ts b/ui/web/src/composables/UIClient.ts index 491a0b12..023aef11 100644 --- a/ui/web/src/composables/UIClient.ts +++ b/ui/web/src/composables/UIClient.ts @@ -1,4 +1,5 @@ import { useToast } from 'vue-toast-notification' +import { randomUUID } from './Utils' import { ApplicationProtocol, AuthenticationType, @@ -10,7 +11,6 @@ import { ResponseStatus, type UIServerConfigurationSection } from '@/types' -import { randomUUID } from '@/composables' type ResponseHandler = { procedureName: ProcedureName diff --git a/ui/web/src/views/ChargingStationsView.vue b/ui/web/src/views/ChargingStationsView.vue index fa313d6e..997b2a67 100644 --- a/ui/web/src/views/ChargingStationsView.vue +++ b/ui/web/src/views/ChargingStationsView.vue @@ -20,11 +20,6 @@ 'open', () => { setToLocalStorage('uiServerConfigurationIndex', state.uiServerIndex) - for (const key in getLocalStorage()) { - if (key.includes('toggle-button')) { - removeFromLocalStorage(key) - } - } $router.currentRoute.value.name !== 'charging-stations' && $router.push({ name: 'charging-stations' }) }, @@ -60,6 +55,7 @@