diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings/src/router/routes.ts | 6 | ||||
-rw-r--r-- | apps/settings/src/views/AppStoreNavigation.vue | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/apps/settings/src/router/routes.ts b/apps/settings/src/router/routes.ts index 7182a606309..35b3b1306d5 100644 --- a/apps/settings/src/router/routes.ts +++ b/apps/settings/src/router/routes.ts @@ -3,6 +3,9 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ import type { RouteConfig } from 'vue-router' +import { loadState } from '@nextcloud/initial-state' + +const appstoreEnabled = loadState<boolean>('settings', 'appstoreEnabled', true) // Dynamic loading const AppStore = () => import(/* webpackChunkName: 'settings-apps-view' */'../views/AppStore.vue') @@ -31,11 +34,10 @@ const routes: RouteConfig[] = [ { path: '/:index(index.php/)?settings/apps', name: 'apps', - // redirect to our default route - the app discover section redirect: { name: 'apps-category', params: { - category: 'discover', + category: appstoreEnabled ? 'discover' : 'installed', }, }, components: { diff --git a/apps/settings/src/views/AppStoreNavigation.vue b/apps/settings/src/views/AppStoreNavigation.vue index 98aee80a802..b7ba24c3e4b 100644 --- a/apps/settings/src/views/AppStoreNavigation.vue +++ b/apps/settings/src/views/AppStoreNavigation.vue @@ -6,7 +6,8 @@ <!-- 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> |