diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2024-09-17 23:15:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-17 23:15:33 +0200 |
commit | 14d75f0632f51596aec0bea9761eca4d9d1a73b5 (patch) | |
tree | 992e9c31f61cf00901fb5518fc4482898bfdf19d /apps | |
parent | 1ab34417db5f05115288e3745c49bd39721bde25 (diff) | |
parent | f8ce148cb9ab0ad13ab025af6df6a9640d2f9574 (diff) | |
download | nextcloud-server-14d75f0632f51596aec0bea9761eca4d9d1a73b5.tar.gz nextcloud-server-14d75f0632f51596aec0bea9761eca4d9d1a73b5.zip |
Merge pull request #48119 from nextcloud/backport/48090/stable29
[stable29] fix(settings): disable Discover when appstore is disabled
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 28adae75d63..2944edcc20e 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<boolean>('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 1e89cda17c1..4d259363be0 100644 --- a/apps/settings/src/views/AppStoreNavigation.vue +++ b/apps/settings/src/views/AppStoreNavigation.vue @@ -2,7 +2,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> |