📚 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
fix: navbar navigation buttons when tabs feature is enabled & tabs duplication during navigation (#686)
Smauga51b35d847dd
diff --git a/frontend/app/components/Navbar.vue b/frontend/app/components/Navbar.vueindex 90e77b56..26fd94f1 100644--- a/frontend/app/components/Navbar.vue+++ b/frontend/app/components/Navbar.vue@@ -6,11 +6,11 @@</div><div class="navbar-center">+ <NavbarRouter /><div v-if="tabEnabled" class="navbar-tabs-wrapper"><AppBtnIcon v-if="!isOpened && !isMobile" icon="burger" class="open-sidebar inline-burger" @click="toggleSidebar" /><Tab class="navbar-tabs" /></div>- <NavbarRouter /><div id="navbar-title" class="navbar-title" /></div>diff --git a/frontend/app/components/NavbarRouter.vue b/frontend/app/components/NavbarRouter.vueindex f0dba631..bcf24601 100644--- a/frontend/app/components/NavbarRouter.vue+++ b/frontend/app/components/NavbarRouter.vue@@ -1,12 +1,12 @@<template>- <template v-if="hasNavigation.navigation">+ <div v-if="hasNavigation.navigation"><button :disabled="!canGoBack" class="nav no-tablet" aria-label="Go back" type="button" @click="goBack"><Icon name="left_arrow" display="lg" /></button><button :disabled="!canGoForward" class="nav no-tablet" aria-label="Go forward" type="button" @click="goForward"><Icon name="right_arrow" display="lg" /></button>- </template>+ </div></template><script lang="ts" setup>@@ -33,6 +33,13 @@ router.afterEach(() => handleState(window.history.state));</script><style lang="scss" scoped>+div {+ display: inline-flex;+ justify-content: center;+ align-items: center;+ gap: 0.5rem;+}+.nav {display: inline-flex;justify-content: center;diff --git a/frontend/app/composables/useTabsSync.ts b/frontend/app/composables/useTabsSync.tsindex e493e09a..49e739aa 100644--- a/frontend/app/composables/useTabsSync.ts+++ b/frontend/app/composables/useTabsSync.ts@@ -5,13 +5,11 @@ export function useTabsSync() {const { t } = useI18nT();function resolveTabTitle(): string {- // 1. Tenter de récupérer le nom via l'ID du Node dans l'URLif (route.params.id) {const node = nodesStore.getById(route.params.id as string);if (node?.name) return node.name;}- // 2. Tenter de récupérer le titre via les métadonnées/breadcrumbs de la routelet i = route.matched.length - 1;let page = route.matched[i];while (page && !page.meta?.breadcrumb && i > 0) {@@ -37,11 +35,9 @@ export function useTabsSync() {return 'Page';}- // Watcher unique pour synchroniser le store avec l'URL activewatch(- () => route.fullPath, // Utilise fullPath au cas où les query params comptent pour tes onglets+ () => route.path,path => {- // Évite d'ajouter des pages hors dashboard (ex: login) si nécessaireif (!path.startsWith('/dashboard')) return;tabsStore.syncTab({