π 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
New navighation tools
Smaug67393f584d395866
diff --git a/frontend/components/Sidebar/Sidebar.vue b/frontend/components/Sidebar/Sidebar.vueindex 9a9709b9..6da4f574 100644--- a/frontend/components/Sidebar/Sidebar.vue+++ b/frontend/components/Sidebar/Sidebar.vue@@ -18,7 +18,11 @@<div>{{ userStore.user.username }}</div><div class="email">{{ userStore.user.email }}</div></div>- <Icon name="logout" @click="logoutUser" class="logout" />+ <div class="icons">+ <NuxtLink to="/dashboard/docs/new"><Icon name="add_file" :mid="true" fill="var(--font-color-dark)" /></NuxtLink>+ <NuxtLink to="/dashboard/categories/new"><Icon name="add_folder" :mid="true" fill="var(--font-color-dark)" /></NuxtLink>+ <NuxtLink @click="collapseAll"><Icon name="collapse" :mid="true" fill="var(--font-color-dark)" /></NuxtLink>+ </div></div></div><SidebarWorkspaces :options="workspaces" />@@ -98,6 +102,15 @@ const handleClickOutside = (e: MouseEvent) => {if (isOpened.value && e.target && !(e.target as Element).closest('.sidebar') && !(e.target as Element).closest('.open-sidebar')) isOpened.value = false;};+const collapseAll = () => {+ items.value.forEach(item => {+ if (item.show.value) {+ localStorage.setItem(`collapse-${item.id}`, 'false');+ item.show.value = false;+ }+ });+};+onMounted(() => {hasSidebar.value = true;if (isMobile()) return document.addEventListener('click', handleClickOutside);@@ -136,7 +149,24 @@ onBeforeUnmount(() => {font-weight: 400;}}-+.icons {+ display: flex;+ height: fit-content;+ a {+ padding: 2px;+ border-radius: 25%;+ align-self: center;+ &:hover {+ background: var(--selection-color);+ }+ svg {+ fill: var(--font-color);+ width: 20px;+ height: 20px;+ margin: 0;+ }+ }+}.search {height: 30px;margin: 2.5px 0;@@ -164,16 +194,6 @@ onBeforeUnmount(() => {font-size: 0.7rem;color: var(--font-color-light);}- .logout {- display: none;- cursor: pointer;- }- }- &:hover {- .logout {- display: block;- opacity: 0.8;- }}}.compact:deep(.item) {diff --git a/frontend/components/Sidebar/SidebarItem.vue b/frontend/components/Sidebar/SidebarItem.vueindex 52d98534..a85fe40b 100644--- a/frontend/components/Sidebar/SidebarItem.vue+++ b/frontend/components/Sidebar/SidebarItem.vue@@ -2,8 +2,8 @@<span class="item" @click="onClick" :draggable="draggable" @dragstart="dragStart" @dragover.prevent="dragOver" @drop="drop" @dragleave="dragLeave" :class="{ 'drag-over': isDragOver }" :key="item.id"><Icon :name="getIcon()" /><NuxtLink :to="item.route" style="width: 100%" class="close">{{ item.title }} </NuxtLink>- <NuxtLink v-if="item.data.type === 'category'" :to="`/dashboard/categories/${item.id}/edit`" class="nav close"> <Icon name="c_settings" fill="var(--font-color)" /> </NuxtLink>- <NuxtLink v-if="item.data.type === 'category' && item.parent_id" :to="`/dashboard/docs/new?cat=${item.id}`" class="nav close"> <Icon name="plus" fill="var(--font-color)" /> </NuxtLink>+ <NuxtLink v-if="item.data.type === 'category'" :to="`/dashboard/categories/${item.id}/edit`" class="nav close"> <Icon name="settings" fill="var(--font-color)" /> </NuxtLink>+ <NuxtLink v-if="item.data.type === 'category'" :to="`/dashboard/docs/new?cat=${item.id}`" class="nav close"> <Icon name="plus" fill="var(--font-color)" /> </NuxtLink><slot></slot></span></template>@@ -107,14 +107,9 @@ const drop = async (event: DragEvent) => {}.icon {- display: flex;- align-items: center;-&:deep(svg) {fill: $primary-color;- width: 19px;- max-height: 21px;- margin-right: 5px;+ margin-right: 4px;path {fill: $primary-color;