📚 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 preferences options: developer mode + fix link to reset to advanced page
Smaug6739540f02eb374a
diff --git a/frontend/app/components/Node/NodeContextMenu.vue b/frontend/app/components/Node/NodeContextMenu.vueindex 925d4424..f8a99bcc 100644--- a/frontend/app/components/Node/NodeContextMenu.vue+++ b/frontend/app/components/Node/NodeContextMenu.vue@@ -12,7 +12,7 @@<button @click="action('duplicate')"><Icon fill="var(--font-color)" name="duplicate" /> Duplicate</button></template><button @click="action('copyLink')"><Icon fill="var(--font-color)" name="link" /> Copy link</button>- <button @click="action('copyId')"><Icon fill="var(--font-color)" name="snippets" /> Copy ID</button>+ <button v-if="preferences.get('developerMode').value" @click="action('copyId')"><Icon fill="var(--font-color)" name="snippets" /> Copy ID</button><template v-if="nodesStore.hasPermissions(node, 2)"><hr style="margin: 2px 0" /><button @click="action('delete')"><Icon name="delete" fill="red" /> Delete</button>@@ -36,6 +36,7 @@ const user = ref<PublicUser | null>(null);const userStore = useUserStore();const nodesStore = useNodesStore();+const preferences = usePreferences();watchEffect(async () => {if (props.node) user.value = await userStore.fetchPublicUser(props.node.user_id);diff --git a/frontend/app/composables/Preferences.ts b/frontend/app/composables/Preferences.tsindex b63d7a65..3eed3547 100644--- a/frontend/app/composables/Preferences.ts+++ b/frontend/app/composables/Preferences.ts@@ -40,6 +40,7 @@ export const DEFAULT_PREFERENCES = {] as ANode[],editorFontFamily: 'JetBrains Mono' as string,editorFontSize: 14 as number,+ developerMode: false as boolean,};// Crée un type mapping automatique : chaque clé => type exactdiff --git a/frontend/app/pages/dashboard/settings/_views/preferences.vue b/frontend/app/pages/dashboard/settings/_views/preferences.vueindex 30df8612..d8bf1cf2 100644--- a/frontend/app/pages/dashboard/settings/_views/preferences.vue+++ b/frontend/app/pages/dashboard/settings/_views/preferences.vue@@ -61,8 +61,8 @@<div class="reset"><p>- <span style="color: var(--primary); cursor: pointer" @click="preferencesStore.reset"> Reset all preferences </span>- to default.+ You can reset your preferences in the+ <NuxtLink to="/dashboard/settings?p=advanced">advanced page</NuxtLink> settings. Be careful, this action cannot be undone.</p></div></div>@@ -224,6 +224,17 @@ const options = ref<{ label: string; options: Option[] }[]>([},],},+ {+ label: 'Other',+ options: [+ {+ label: 'Developer Mode',+ type: 'toggle',+ key: 'developerMode',+ value: Boolean(preferencesStore.get('developerMode')),+ },+ ],+ },]);</script>@@ -270,5 +281,10 @@ h3 {.reset {margin-top: 2rem;+ a {+ color: var(--primary);+ text-decoration: underline;+ cursor: pointer;+ }}</style>diff --git a/frontend/app/pages/dashboard/settings/index.vue b/frontend/app/pages/dashboard/settings/index.vueindex beb6a080..eb04f89e 100644--- a/frontend/app/pages/dashboard/settings/index.vue+++ b/frontend/app/pages/dashboard/settings/index.vue@@ -56,12 +56,16 @@ import AboutView from './_views/about.vue';import AdvancedView from './_views/advanced.vue';const route = useRoute();+const router = useRouter();const store = useUserStore();defineProps<{ isModal?: boolean }>();const emit = defineEmits<{ (e: 'close'): void }>();const currentPage = ref(route.query.p || 'profile');-const setPage = (p: string) => (currentPage.value = p);+const setPage = (p: string) => {+ router.push({ query: { ...route.query, p: '' } });+ currentPage.value = p;+};watchEffect(() => {if (route.query.p && typeof route.query.p === 'string') currentPage.value = route.query.p;});