From: Jérôme Benoit Date: Sun, 3 Mar 2024 21:15:12 +0000 (+0100) Subject: perf(ui): use computed ref when possible X-Git-Tag: v1.3.0~61 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=ec7366ed6c79d62c203c8db30fb74504374427f3;p=e-mobility-charging-stations-simulator.git perf(ui): use computed ref when possible Signed-off-by: Jérôme Benoit --- diff --git a/ui/web/src/components/charging-stations/CSData.vue b/ui/web/src/components/charging-stations/CSData.vue index 6a31e20b..3eab286f 100644 --- a/ui/web/src/components/charging-stations/CSData.vue +++ b/ui/web/src/components/charging-stations/CSData.vue @@ -9,7 +9,7 @@ {{ getWSState() }} - {{ chargingStation?.bootNotificationResponse?.status ?? 'Ø' }} + {{ chargingStation.bootNotificationResponse?.status ?? 'Ø' }} {{ chargingStation.stationInfo.templateName }} diff --git a/ui/web/src/views/ChargingStationsView.vue b/ui/web/src/views/ChargingStationsView.vue index f76e40e6..2546c6bf 100644 --- a/ui/web/src/views/ChargingStationsView.vue +++ b/ui/web/src/views/ChargingStationsView.vue @@ -65,14 +65,9 @@ :status="state.simulatorState?.started" :on="() => startSimulator()" :off="() => stopSimulator()" - :class=" - state.simulatorState?.started === true - ? 'simulator-stop-button' - : 'simulator-start-button' - " + :class="simulatorButtonClass" > - {{ state.simulatorState?.started === true ? 'Stop' : 'Start' }} Simulator - {{ state.simulatorState?.version != null ? ` (${state.simulatorState?.version})` : '' }} + {{ simulatorButtonMessage }}