From 2610da71b813ad94e1a2a48755d5689da53b41fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 1 Mar 2024 15:33:22 +0100 Subject: [PATCH] feat(ui): introduce toggle button and use it for actions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../actions/AddChargingStations.vue | 17 +++--- .../components/actions/SetSupervisionUrl.vue | 1 - .../components/actions/StartTransaction.vue | 1 - .../src/components/buttons/ToggleButton.vue | 56 +++++++++++++++++++ .../charging-stations/CSConnector.vue | 24 +++++--- .../components/charging-stations/CSData.vue | 48 +++++++++------- .../components/charging-stations/CSTable.vue | 2 +- ui/web/src/composables/UIClient.ts | 3 +- ui/web/src/composables/Utils.ts | 12 ++++ ui/web/src/composables/index.ts | 10 +++- ui/web/src/views/ChargingStationsView.vue | 35 +++++++++--- 11 files changed, 162 insertions(+), 47 deletions(-) create mode 100644 ui/web/src/components/buttons/ToggleButton.vue diff --git a/ui/web/src/components/actions/AddChargingStations.vue b/ui/web/src/components/actions/AddChargingStations.vue index ff9f5f61..a0661a08 100644 --- a/ui/web/src/components/actions/AddChargingStations.vue +++ b/ui/web/src/components/actions/AddChargingStations.vue @@ -2,15 +2,15 @@

Action

Add Charging Stations

Template:

- - @@ -95,7 +95,6 @@ > Add Charging Stations - + + diff --git a/ui/web/src/components/charging-stations/CSConnector.vue b/ui/web/src/components/charging-stations/CSConnector.vue index 7c31ae98..d3e37d63 100644 --- a/ui/web/src/components/charging-stations/CSConnector.vue +++ b/ui/web/src/components/charging-stations/CSConnector.vue @@ -9,16 +9,25 @@ {{ atgStatus?.start === true ? 'Yes' : 'No' }} - + @@ -31,6 +40,7 @@ import { getCurrentInstance } from 'vue' import { useToast } from 'vue-toast-notification' import Button from '@/components/buttons/Button.vue' import type { ConnectorStatus, Status } from '@/types' +import ToggleButton from '@/components/buttons/ToggleButton.vue' const props = defineProps<{ hashId: string diff --git a/ui/web/src/components/charging-stations/CSData.vue b/ui/web/src/components/charging-stations/CSData.vue index 2462e6d6..375fb3bc 100644 --- a/ui/web/src/components/charging-stations/CSData.vue +++ b/ui/web/src/components/charging-stations/CSData.vue @@ -1,40 +1,49 @@