diff options
Diffstat (limited to 'apps/settings/src/views/AppStoreNavigation.vue')
-rw-r--r-- | apps/settings/src/views/AppStoreNavigation.vue | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/apps/settings/src/views/AppStoreNavigation.vue b/apps/settings/src/views/AppStoreNavigation.vue index 1e89cda17c1..83191baac40 100644 --- a/apps/settings/src/views/AppStoreNavigation.vue +++ b/apps/settings/src/views/AppStoreNavigation.vue @@ -1,8 +1,13 @@ +<!-- + - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + - SPDX-License-Identifier: AGPL-3.0-or-later +--> <template> <!-- Categories & filters --> <NcAppNavigation :aria-label="t('settings', 'Apps')"> <template #list> - <NcAppNavigationItem id="app-category-discover" + <NcAppNavigationItem v-if="appstoreEnabled" + id="app-category-discover" :to="{ name: 'apps-category', params: { category: 'discover'} }" :name="APPS_SECTION_ENUM.discover"> <template #icon> @@ -30,12 +35,12 @@ <NcIconSvgWrapper :path="APPSTORE_CATEGORY_ICONS.disabled" /> </template> </NcAppNavigationItem> - <NcAppNavigationItem v-if="updateCount > 0" + <NcAppNavigationItem v-if="store.updateCount > 0" id="app-category-updates" :to="{ name: 'apps-category', params: { category: 'updates' } }" :name="APPS_SECTION_ENUM.updates"> <template #counter> - <NcCounterBubble>{{ updateCount }}</NcCounterBubble> + <NcCounterBubble>{{ store.updateCount }}</NcCounterBubble> </template> <template #icon> <NcIconSvgWrapper :path="APPSTORE_CATEGORY_ICONS.updates" /> @@ -100,16 +105,15 @@ import { computed, onBeforeMount } from 'vue' import { APPS_SECTION_ENUM } from '../constants/AppsConstants' import { useAppsStore } from '../store/apps-store' -import NcAppNavigation from '@nextcloud/vue/dist/Components/NcAppNavigation.js' -import NcAppNavigationItem from '@nextcloud/vue/dist/Components/NcAppNavigationItem.js' -import NcAppNavigationSpacer from '@nextcloud/vue/dist/Components/NcAppNavigationSpacer.js' -import NcCounterBubble from '@nextcloud/vue/dist/Components/NcCounterBubble.js' -import NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js' -import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js' +import NcAppNavigation from '@nextcloud/vue/components/NcAppNavigation' +import NcAppNavigationItem from '@nextcloud/vue/components/NcAppNavigationItem' +import NcAppNavigationSpacer from '@nextcloud/vue/components/NcAppNavigationSpacer' +import NcCounterBubble from '@nextcloud/vue/components/NcCounterBubble' +import NcIconSvgWrapper from '@nextcloud/vue/components/NcIconSvgWrapper' +import NcLoadingIcon from '@nextcloud/vue/components/NcLoadingIcon' import APPSTORE_CATEGORY_ICONS from '../constants/AppstoreCategoryIcons.ts' -const updateCount = loadState<number>('settings', 'appstoreUpdateCount', 0) const appstoreEnabled = loadState<boolean>('settings', 'appstoreEnabled', true) const developerDocsUrl = loadState<string>('settings', 'appstoreDeveloperDocs', '') |