aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src/router
diff options
context:
space:
mode:
authorGrigorii K. Shartsev <me@shgk.me>2024-09-16 15:31:17 +0200
committerGrigorii K. Shartsev <me@shgk.me>2024-09-16 16:28:04 +0200
commiteab54788a27004fb30c960ee7d68330b5c80316b (patch)
tree8ddbca9df84fb560cdcf69cf399f0300d381d76d /apps/settings/src/router
parentcfed24cb0254caf570b2a520979a83435a677cc8 (diff)
downloadnextcloud-server-eab54788a27004fb30c960ee7d68330b5c80316b.tar.gz
nextcloud-server-eab54788a27004fb30c960ee7d68330b5c80316b.zip
fix(settings): disable Discover when appstore is disabled
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Diffstat (limited to 'apps/settings/src/router')
-rw-r--r--apps/settings/src/router/routes.ts6
1 files changed, 4 insertions, 2 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: {