mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #48090 from nextcloud/fix/settings--disable-discover-when-app-store-is-disabled
fix(settings): disable Discover when appstore is disabled
This commit is contained in:
commit
f0bf7990f8
6 changed files with 12 additions and 9 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
4
dist/settings-apps-view-4529.js
vendored
4
dist/settings-apps-view-4529.js
vendored
File diff suppressed because one or more lines are too long
2
dist/settings-apps-view-4529.js.map
vendored
2
dist/settings-apps-view-4529.js.map
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue