diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 96060fe..ff0abb8 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -342,10 +342,11 @@ const canManageSpaceSettings = computed( authStore.hasSpacePermission(currentSpace.value, "settings.member.view"), ); -const flattenCategories = (items, level = 0) => +const flattenCategories = (items, trail = []) => items.flatMap((category) => { - const label = `${" ".repeat(level)}${category.name}`; - return [{ id: category.id, name: category.name, label }, ...(category.subcategories?.length ? flattenCategories(category.subcategories, level + 1) : [])]; + const nextTrail = [...trail, category.name]; + const label = nextTrail.join("/"); + return [{ id: category.id, name: category.name, label }, ...(category.subcategories?.length ? flattenCategories(category.subcategories, nextTrail) : [])]; }); const categoryOptions = computed(() => flattenCategories(categoryTree.value)); diff --git a/frontend/src/components/NoteEditor.vue b/frontend/src/components/NoteEditor.vue index 58d0a06..f628f00 100644 --- a/frontend/src/components/NoteEditor.vue +++ b/frontend/src/components/NoteEditor.vue @@ -4,9 +4,6 @@ - {{ saveStatusLabel }} @@ -19,11 +16,11 @@
-
+
-
+
@@ -101,7 +98,6 @@ const settingsStore = useSettingsStore(); const publicSharingEnabled = ref(true); const editingNote = ref({ ...props.note }); -const showPreview = ref(false); const tagsInput = ref(props.note.tags?.join(", ") || ""); const passwordAction = ref("keep"); const notePassword = ref(""); @@ -201,10 +197,6 @@ const confirmDelete = () => { } }; -const togglePreview = () => { - showPreview.value = !showPreview.value; -}; - onBeforeUnmount(() => { clearTimeout(saveTimeout.value); clearTimeout(saveStateTimeout.value);