implement toolbar actions
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
const emit = defineEmits<{
|
||||
delete: []
|
||||
setRoot: []
|
||||
delete: [close: () => void]
|
||||
setRoot: [close: () => void]
|
||||
}>()
|
||||
</script>
|
||||
<template>
|
||||
@@ -18,9 +18,9 @@ const emit = defineEmits<{
|
||||
<i class="fas fa-fw fa-trash" />
|
||||
</button>
|
||||
</template>
|
||||
<template #default>Are you sure you want to delete this?</template>
|
||||
<template #default>Are you sure you want to delete this note?</template>
|
||||
<template #actions="{ close }">
|
||||
<button class="btn-primary btn-sm btn mr-1" @click="emit('delete')">
|
||||
<button class="btn-primary btn-sm btn mr-1" @click="emit('delete', close)">
|
||||
Delete note
|
||||
</button>
|
||||
<button class="btn-sm btn" @click="close">Close</button>
|
||||
@@ -36,7 +36,7 @@ const emit = defineEmits<{
|
||||
Are you sure you want to set this note as root note?
|
||||
</template>
|
||||
<template #actions="{ close }">
|
||||
<button class="btn-primary btn-sm btn mr-1" @click="emit('setRoot')">
|
||||
<button class="btn-primary btn-sm btn mr-1" @click="emit('setRoot', close)">
|
||||
Set current note as root
|
||||
</button>
|
||||
<button class="btn-sm btn" @click="close">Close</button>
|
||||
|
||||
Reference in New Issue
Block a user