add: wording, vibration

Adapt wordings, add small vibration on edit and delete
This commit is contained in:
Fiona Lena Urban 2025-05-10 13:59:25 +02:00
parent 3f398a0081
commit 27f051cf14
4 changed files with 8 additions and 6 deletions

View file

@ -67,6 +67,7 @@ type Props = {
const { card } = defineProps<Props>()
const emit = defineEmits(['remove', 'update'])
const { vibrate } = useVibrate()
const top = useTemplateRef('top')
const left = shallowRef<string>('0')
@ -86,6 +87,7 @@ const { lengthX, direction, isSwiping } = useSwipe(top, {
if (['down', 'up'].includes(direction.value)) return
if (lengthX.value < -50) update()
if (lengthX.value > 50) deleteCard()
vibrate(100)
left.value = '0'
},
})