π The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
Collapse sub folders and docs
Smaug67394abe4d530650
diff --git a/frontend/components/Sidebar/CollapseItem.vue b/frontend/components/Sidebar/CollapseItem.vueindex 249e70e3..11830da4 100644--- a/frontend/components/Sidebar/CollapseItem.vue+++ b/frontend/components/Sidebar/CollapseItem.vue@@ -1,6 +1,6 @@<template><div v-if="item.childrens?.length">- <SidebarItem v-if="root && item.data.type == 'document'" :item="item" class="collapse-header doc">+ <SidebarItem v-if="true || (root && item.data.type == 'document')" :item="item" class="collapse-header doc"><svg @click="toggleShow" :class="{ rotated: !props.item.show.value }" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z" /></svg>diff --git a/frontend/components/Sidebar/Sidebar.vue b/frontend/components/Sidebar/Sidebar.vueindex 162a9e2c..8d8c3eca 100644--- a/frontend/components/Sidebar/Sidebar.vue+++ b/frontend/components/Sidebar/Sidebar.vue@@ -72,7 +72,7 @@ const items = computed((): Item[] => {route: category.parent_id ? `/dashboard/categories/${category.id}` : '',icon: category.icon,data: category,- show: !category.parent_id && localStorage.getItem(`collapse-${category.id}`) === 'false' ? ref(false) : ref(true),+ show: localStorage.getItem(`collapse-${category.id}`) === 'false' ? ref(false) : ref(true),})).filter(c => c.data.role === 1 && c.data.name.toLowerCase().includes(filter.value.toLowerCase()));const documents: Item[] = documentsStore.documents