This commit is contained in:
2023-06-08 22:22:29 +02:00
parent 3e6fb75575
commit cf287f31ab
10 changed files with 41 additions and 49 deletions

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import { onClickOutside } from '@vueuse/core'
import { Haptics, ImpactStyle } from '@capacitor/haptics'
import { vibrate } from '@/composables/useHaptics'
const props = withDefaults(
defineProps<{
@@ -20,9 +20,8 @@ const show = ref<boolean>(false)
watch(
() => props.open,
() => {
if (show.value) {
Haptics.impact({ style: ImpactStyle.Light })
}
if (show.value) vibrate()
show.value = props.open
},
{ immediate: true }