diff options
author | Grigorii K. Shartsev <me@shgk.me> | 2024-09-17 13:31:26 +0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-17 13:31:26 +0500 |
commit | f0bf7990f8b7daa6b9de1f046d163b60ab0296b2 (patch) | |
tree | a3ce16e823e4d8bed29cd7fdd225e6198a90694d /apps | |
parent | a9ad7668eba6ab2fca87b16d47b88d795f7e2f66 (diff) | |
parent | 5ac467ba0f1483c4f89074c5d005be9fa0be3ab4 (diff) | |
download | nextcloud-server-f0bf7990f8b7daa6b9de1f046d163b60ab0296b2.tar.gz nextcloud-server-f0bf7990f8b7daa6b9de1f046d163b60ab0296b2.zip |
Merge pull request #48090 from nextcloud/fix/settings--disable-discover-when-app-store-is-disabled
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 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> |