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/ContactDetails.vue b/src/components/ContactDetails.vue index f246c957e5..21900c015f 100644 --- a/src/components/ContactDetails.vue +++ b/src/components/ContactDetails.vue @@ -1015,13 +1015,23 @@ export default defineComponent({ addressbook, }) // select the contact again - this.$router.push({ - name: 'contact', - params: { - selectedGroup: this.$route.params.selectedGroup, - selectedContact: contact.key, - }, - }) + if (this.$route.params.selectedAddressbook) { + this.$router.push({ + name: 'addressbook-contact', + params: { + selectedAddressbook: this.$route.params.selectedAddressbook, + selectedContact: contact.key, + }, + }) + } else { + this.$router.push({ + name: 'contact', + params: { + selectedGroup: this.$route.params.selectedGroup, + selectedContact: contact.key, + }, + }) + } } catch (error) { console.error(error) showError(t('contacts', 'An error occurred while trying to move the contact')) @@ -1048,13 +1058,23 @@ export default defineComponent({ addressbook, }) // select the contact again - this.$router.push({ - name: 'contact', - params: { - selectedGroup: this.$route.params.selectedGroup, - selectedContact: contact.key, - }, - }) + if (this.$route.params.selectedAddressbook) { + this.$router.push({ + name: 'addressbook-contact', + params: { + selectedAddressbook: this.$route.params.selectedAddressbook, + selectedContact: contact.key, + }, + }) + } else { + this.$router.push({ + name: 'contact', + params: { + selectedGroup: this.$route.params.selectedGroup, + selectedContact: contact.key, + }, + }) + } } catch (error) { console.error(error) showError(t('contacts', 'An error occurred while trying to copy the contact')) diff --git a/src/components/ContactsList/ContactsListItem.vue b/src/components/ContactsList/ContactsListItem.vue index 2ae0208c4e..cc3072a693 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">