From e23981aa8ee65fdca3eee4099216052973519bce Mon Sep 17 00:00:00 2001 From: Matthieu Date: Wed, 1 Jul 2026 17:43:10 +0200 Subject: [PATCH 1/2] feat(navigation): restore address book navigation in sidebar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address books used to be listed in the left sidebar (via the now-deleted SettingsSection.vue), allowing users to click on a book to filter their contacts. This was removed in bd536c0e when settings were migrated to a modal dialog, without any navigation replacement — making the "New address book" feature essentially invisible and unusable. Changes: - Add "Address books" section in RootNavigation with one item per enabled address book and a contact counter - Add ROUTE_ADDRESSBOOK constant and addressbook/:selectedAddressbook route - Add selectedAddressbook to RouterMixin - Filter contactsList by selected address book when on the addressbook route - New contacts created while an address book is selected are saved into that address book instead of the default one - Prevent "Missing required param selectedGroup" errors in selectFirstContactIfNone() and ContactsListItem when on the addressbook route by using GROUP_ALL_CONTACTS as fallback Assisted-by: Claude:claude-sonnet-4-6 Signed-off-by: Matthieu --- .../AppNavigation/RootNavigation.vue | 39 ++++++++++++++++++- .../ContactsList/ContactsListItem.vue | 19 ++++++--- src/mixins/RouterMixin.js | 3 ++ src/models/constants.ts | 1 + src/router/index.js | 7 +++- src/views/Contacts.vue | 21 ++++++++-- 6 files changed, 78 insertions(+), 12 deletions(-) diff --git a/src/components/AppNavigation/RootNavigation.vue b/src/components/AppNavigation/RootNavigation.vue index de60ab6ca3..84b55928fb 100644 --- a/src/components/AppNavigation/RootNavigation.vue +++ b/src/components/AppNavigation/RootNavigation.vue @@ -73,6 +73,28 @@ + + + + + + + ab.enabled) + }, + circles() { return this.$store.getters.getCircles }, @@ -426,6 +459,10 @@ export default { }, methods: { + addressbookContactCount(addressbook) { + return Object.keys(addressbook.contacts || {}).length + }, + toggleNewGroupMenu() { this.isNewGroupMenuOpen = !this.isNewGroupMenuOpen }, diff --git a/src/components/ContactsList/ContactsListItem.vue b/src/components/ContactsList/ContactsListItem.vue index 2ae0208c4e..008af56608 100644 --- a/src/components/ContactsList/ContactsListItem.vue +++ b/src/components/ContactsList/ContactsListItem.vue @@ -13,7 +13,7 @@ :key="source.key" class="list-item-style envelope" :name="source.displayName" - :to="isStatic ? undefined : { name: 'contact', params: { selectedGroup: selectedGroup, selectedContact: source.key } }"> + :to="isStatic ? undefined : contactRoute">