aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src/router
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings/src/router')
-rw-r--r--apps/settings/src/router/index.ts24
-rw-r--r--apps/settings/src/router/routes.ts10
2 files changed, 10 insertions, 24 deletions
diff --git a/apps/settings/src/router/index.ts b/apps/settings/src/router/index.ts
index 6dbeea2cd57..9afa2e78146 100644
--- a/apps/settings/src/router/index.ts
+++ b/apps/settings/src/router/index.ts
@@ -1,26 +1,6 @@
/**
- * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
- *
- * @author John Molakvoæ <skjnldsv@protonmail.com>
- * @author Julius Härtl <jus@bitgrid.net>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- * @author Ferdinand Thiessen <opensource@fthiessen.de>
- *
- * @license AGPL-3.0-or-later
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
import Vue from 'vue'
diff --git a/apps/settings/src/router/routes.ts b/apps/settings/src/router/routes.ts
index 28adae75d63..35b3b1306d5 100644
--- a/apps/settings/src/router/routes.ts
+++ b/apps/settings/src/router/routes.ts
@@ -1,4 +1,11 @@
+/**
+ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+ * 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')
@@ -27,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: {