}
setToLocalStorage<boolean>(id, !getFromLocalStorage<boolean>(id, props.status ?? false))
state.value.status = getFromLocalStorage<boolean>(id, props.status ?? false)
- // console.log(`----begin----`)
- // for (const key in localStorage) {
- // if (key.startsWith('shared-toggle-button-')) {
- // console.log(key, getFromLocalStorage<boolean>(key, props.status ?? false))
- // }
- // }
- // console.log(`----end----`)
if (getFromLocalStorage<boolean>(id, props.status ?? false)) {
props.on?.()
} else {
<ReloadButton
id="reload-button"
:loading="state.loading"
- @click="loadChargingStations(() => (state.renderChargingStationsList = randomUUID()))"
+ @click="loadChargingStations(() => (state.renderChargingStations = randomUUID()))"
/>
</Container>
<CSTable
v-show="
Array.isArray(app?.appContext.config.globalProperties.$chargingStations) &&
- app?.appContext.config.globalProperties.$chargingStations.length > 0
+ app.appContext.config.globalProperties.$chargingStations.length > 0
"
- :key="state.renderChargingStationsList"
+ :key="state.renderChargingStations"
:charging-stations="app?.appContext.config.globalProperties.$chargingStations"
/>
</Container>
clearToggleButtons()
app!.appContext.config.globalProperties.$chargingStations = []
state.value.renderAddChargingStations = randomUUID()
- state.value.renderChargingStationsList = randomUUID()
+ state.value.renderChargingStations = randomUUID()
}
const initializeWSEventListeners = () => {
})
loadChargingStations(() => {
state.value.renderAddChargingStations = randomUUID()
- state.value.renderChargingStationsList = randomUUID()
+ state.value.renderChargingStations = randomUUID()
})
})
app?.appContext.config.globalProperties.$uiClient.registerWSEventListener(
const state = ref({
renderAddChargingStations: randomUUID(),
- renderChargingStationsList: randomUUID(),
+ renderChargingStations: randomUUID(),
loading: false,
uiServerIndex: getFromLocalStorage<number>('uiServerConfigurationIndex', 0)
})