This commit is contained in:
2023-12-08 22:42:48 +01:00
parent aee6ecfbfe
commit 10c0387eb0
16 changed files with 38 additions and 32 deletions

View File

@@ -38,7 +38,7 @@ const confirmModals: ModalOptions[] = [
]
const emit = defineEmits<{
execute: [actionType: ActionKey, close?: () => void]
execute: [actionType: ActionKey, close?: () => Promise<void>]
}>()
const openModal = async (open: () => void, modal: ModalOptions) => {
@@ -58,12 +58,7 @@ const openModal = async (open: () => void, modal: ModalOptions) => {
<UIButtonGroup class="flex items-center" v-if="!props.note.isRoot">
<UIModal v-for="confirmModal in confirmModals" :key="confirmModal.key">
<template #activator="{ open }">
<UIButton
size="sm"
@click="openModal(open, confirmModal)"
:join="true"
@mousedown="vibrate"
>
<UIButton size="sm" @click="openModal(open, confirmModal)" @mousedown="vibrate" join>
<i :class="confirmModal.icon" />
</UIButton>
</template>