From: Jérôme Benoit Date: Fri, 17 Apr 2026 00:58:43 +0000 (+0200) Subject: fix(ui-web): use portable WebSocketReadyState in CSData isWebSocketOpen X-Git-Tag: cli@v4.5.0~44 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=51aa070b3044074a394a9b7123a64dc22c2489b4;p=e-mobility-charging-stations-simulator.git fix(ui-web): use portable WebSocketReadyState in CSData isWebSocketOpen Replace browser-specific WebSocket.OPEN with WebSocketReadyState.OPEN from ui-common for environment portability. --- diff --git a/ui/web/src/components/charging-stations/CSData.vue b/ui/web/src/components/charging-stations/CSData.vue index 6420c007..1aa169d8 100644 --- a/ui/web/src/components/charging-stations/CSData.vue +++ b/ui/web/src/components/charging-stations/CSData.vue @@ -121,6 +121,7 @@ import { type ConnectorEntry, getWebSocketStateName, type Status, + WebSocketReadyState, } from 'ui-common' import { computed } from 'vue' import { useToast } from 'vue-toast-notification' @@ -143,7 +144,7 @@ const props = defineProps<{ const $emit = defineEmits(['need-refresh']) -const isWebSocketOpen = computed(() => props.chargingStation.wsState === WebSocket.OPEN) +const isWebSocketOpen = computed(() => props.chargingStation.wsState === WebSocketReadyState.OPEN) const getConnectorEntries = (): ConnectorEntry[] => { if (Array.isArray(props.chargingStation.evses) && props.chargingStation.evses.length > 0) {