π 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
Save in memory (localstorage) sidebar preferences
Smaug67395d017e8c431d
diff --git a/frontend/components/Sidebar/CollapseItem.vue b/frontend/components/Sidebar/CollapseItem.vueindex 37df91b2..1412ac3f 100644--- a/frontend/components/Sidebar/CollapseItem.vue+++ b/frontend/components/Sidebar/CollapseItem.vue@@ -16,10 +16,13 @@<script setup lang="ts">import type { Item } from './tree_builder';-defineProps<{ item: Item; root?: boolean }>();--const show = ref(true);-const toggleShow = () => (show.value = !show.value);+const props = defineProps<{ item: Item; root?: boolean }>();+const status = localStorage.getItem(`collapse-${props.item.id}`);+const show = ref(status ? status === 'true' : true);+const toggleShow = () => {+ show.value = !show.value;+ localStorage.setItem(`collapse-${props.item.id}`, show.value.toString());+};</script><style lang="scss" scoped>