diff --git a/src/components/home/navigation.vue b/src/components/home/navigation.vue index 2cc7a114..2476f470 100644 --- a/src/components/home/navigation.vue +++ b/src/components/home/navigation.vue @@ -54,14 +54,14 @@ + v-tooltip="namespaceTitles[nk]"> - {{ getNamespaceTitle(n) }} ({{ n.lists.filter(l => !l.isArchived).length }}) + {{ namespaceTitles[nk] }} state[LOADING] && state[LOADING_MODULE] === 'namespaces', }), activeLists() { - return this.namespaces.map(({lists}) => lists.filter(item => !item.isArchived)) + return this.namespaces.map(({lists}) => lists?.filter(item => !item.isArchived)) + }, + namespaceTitles() { + return this.namespaces.map((namespace, index) => { + const title = this.getNamespaceTitle(namespace) + return `${title} (${this.activeLists[index]?.length ?? 0})` + }) }, }, beforeCreate() { @@ -229,7 +235,7 @@ export default { } }, toggleLists(namespaceId) { - this.listsVisible[namespaceId] = !this.listsVisible[namespaceId] ?? false + this.listsVisible[namespaceId] = !this.listsVisible[namespaceId] }, updateActiveLists(namespace, activeLists) { // this is a bit hacky: since we do have to filter out the archived items from the list