From 16fe3949f743c57db407cc02a5c017af4da1c7a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 26 Aug 2022 12:06:17 +0200 Subject: [PATCH] Web UI: method namespace cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/ui/web/src/composable/UIClient.ts | 2 +- src/ui/web/src/views/ChargingStationsView.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/web/src/composable/UIClient.ts b/src/ui/web/src/composable/UIClient.ts index d0a93bee..22e3a7f2 100644 --- a/src/ui/web/src/composable/UIClient.ts +++ b/src/ui/web/src/composable/UIClient.ts @@ -33,7 +33,7 @@ export default class UIClient { return UIClient._instance; } - public onOpen(listener: (this: WebSocket, ev: Event) => void) { + public registerWSonOpenListener(listener: (this: WebSocket, ev: Event) => void) { this._ws.addEventListener('open', listener); } diff --git a/src/ui/web/src/views/ChargingStationsView.vue b/src/ui/web/src/views/ChargingStationsView.vue index 10d6e4da..9a5a2ce1 100644 --- a/src/ui/web/src/views/ChargingStationsView.vue +++ b/src/ui/web/src/views/ChargingStationsView.vue @@ -28,7 +28,7 @@ import { ChargingStationData } from '@/type/ChargingStationType'; const UIClientInstance = UIClient.instance; onMounted(() => { - UIClientInstance.onOpen(load); + UIClientInstance.registerWSonOpenListener(load); }); type State = { -- 2.34.1