Skip to content

Commit

Permalink
Mini-widgets: Armer-button: Disable button on edit mode
Browse files Browse the repository at this point in the history
Signed-off-by: Arturo Manzoli <[email protected]>
  • Loading branch information
ArturoManzoli committed Nov 26, 2024
1 parent 4731ac3 commit 2e9c060
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/mini-widgets/ArmerButton.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<button
class="relative flex items-center justify-center w-32 p-1 rounded-md shadow-inner h-9 bg-slate-800/60"
@click="vehicleStore.isArmed ? disarm() : arm()"
@click="!widgetStore.editingMode && (vehicleStore.isArmed ? disarm() : arm())"
>
<div
class="absolute top-auto flex items-center px-1 rounded-[4px] shadow transition-all w-[70%] h-[80%]"
Expand All @@ -24,8 +24,10 @@
import { canByPassCategory, EventCategory, slideToConfirm } from '@/libs/slide-to-confirm'
import { tryOrAlert } from '@/libs/utils'
import { useMainVehicleStore } from '@/stores/mainVehicle'
import { useWidgetManagerStore } from '@/stores/widgetManager'
const vehicleStore = useMainVehicleStore()
const widgetStore = useWidgetManagerStore()
const arm = (): void => {
const tryToArm = async (): Promise<void> => tryOrAlert(vehicleStore.arm)
Expand Down

0 comments on commit 2e9c060

Please sign in to comment.