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'
},
})

View file

@ -5,7 +5,7 @@
>
<form method="dialog">
<header class="flex-row padding">
{{ cardLabel }}
{{ currentCardIndex > -1 ? 'Bearbeiten' : 'Neues Hinzufügen' }}
<PpButton class="round text">
<Icon name="uil:times" mode="svg" />
</PpButton>
@ -65,7 +65,7 @@
</PpButton>
</form>
<PpButton class="raised" @click="validate">
<span>{{ cardLabel }}</span>
<span>{{ currentCardIndex > -1 ? 'Übernehmen' : 'Hinzufügen' }}</span>
</PpButton>
</footer>
</dialog>