auto imports

This commit is contained in:
2023-05-12 23:28:02 +02:00
parent 282ff48f49
commit 3fed5ddd8d
17 changed files with 655 additions and 72 deletions

View 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>