diff --git a/apps/settings/src/router/routes.ts b/apps/settings/src/router/routes.ts index 28adae75d63f6..2944edcc20eb3 100644 --- a/apps/settings/src/router/routes.ts +++ b/apps/settings/src/router/routes.ts @@ -1,4 +1,7 @@ import type { RouteConfig } from 'vue-router' +import { loadState } from '@nextcloud/initial-state' + +const appstoreEnabled = loadState('settings', 'appstoreEnabled', true) // Dynamic loading const AppStore = () => import(/* webpackChunkName: 'settings-apps-view' */'../views/AppStore.vue') @@ -27,11 +30,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 1e89cda17c1a8..4d259363be0e6 100644 --- a/apps/settings/src/views/AppStoreNavigation.vue +++ b/apps/settings/src/views/AppStoreNavigation.vue @@ -2,7 +2,8 @@