auto imports
This commit is contained in:
47
src/components/Note/NoteToolbar.vue
Normal file
47
src/components/Note/NoteToolbar.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<script setup lang="ts">
|
||||
const emit = defineEmits<{
|
||||
delete: []
|
||||
setRoot: []
|
||||
}>()
|
||||
</script>
|
||||
<template>
|
||||
<div class="mb-2 flex items-center">
|
||||
<h1
|
||||
class="mr-2 flex flex-1 items-center rounded-md pr-2 text-3xl font-semibold hover:bg-gray-200"
|
||||
>
|
||||
<slot name="title"></slot>
|
||||
</h1>
|
||||
<div class="btn-group flex items-center">
|
||||
<Modal>
|
||||
<template #activator="{ open }">
|
||||
<button class="btn-sm btn" @click="open">
|
||||
<i class="fas fa-fw fa-trash" />
|
||||
</button>
|
||||
</template>
|
||||
<template #default>Are you sure you want to delete this?</template>
|
||||
<template #actions="{ close }">
|
||||
<button class="btn-primary btn-sm btn mr-1" @click="emit('delete')">
|
||||
Delete note
|
||||
</button>
|
||||
<button class="btn-sm btn" @click="close">Close</button>
|
||||
</template>
|
||||
</Modal>
|
||||
<Modal>
|
||||
<template #activator="{ open }">
|
||||
<button class="btn-sm btn" @click="open">
|
||||
<i class="fas fa-fw fa-sitemap" />
|
||||
</button>
|
||||
</template>
|
||||
<template #default>
|
||||
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')">
|
||||
Set current note as root
|
||||
</button>
|
||||
<button class="btn-sm btn" @click="close">Close</button>
|
||||
</template>
|
||||
</Modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user