hide toolbar is note is rootnote

This commit is contained in:
2023-05-13 08:28:11 +02:00
parent 8eb7e57203
commit 5240d61b35
2 changed files with 5 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ const setRoot = async (closeModal: () => Promise<Boolean>) => {
</script> </script>
<template> <template>
<div class="flex flex-col"> <div class="flex flex-col">
<NoteToolbar @delete="del" @set-root="setRoot"> <NoteToolbar :note="props.note" @delete="del" @set-root="setRoot">
<template #title> <template #title>
<i <i
class="fas fa-fw fa-home mr-2 text-base text-secondary opacity-40" class="fas fa-fw fa-home mr-2 text-base text-secondary opacity-40"

View File

@@ -1,4 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
const props = defineProps<{
note: Note
}>()
const emit = defineEmits<{ const emit = defineEmits<{
delete: [close: () => void] delete: [close: () => void]
setRoot: [close: () => void] setRoot: [close: () => void]
@@ -11,7 +14,7 @@ const emit = defineEmits<{
> >
<slot name="title"></slot> <slot name="title"></slot>
</h1> </h1>
<div class="btn-group flex items-center"> <div class="btn-group flex items-center" v-if="!props.note.isRoot">
<Modal> <Modal>
<template #activator="{ open }"> <template #activator="{ open }">
<button class="btn-toolbar btn-sm btn" @click="open"> <button class="btn-toolbar btn-sm btn" @click="open">