add: wording, vibration
Adapt wordings, add small vibration on edit and delete
This commit is contained in:
parent
3f398a0081
commit
27f051cf14
4 changed files with 8 additions and 6 deletions
|
@ -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'
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue