Skip to content

Commit

Permalink
Merge pull request #48120 from nextcloud/backport/48090/stable30
Browse files Browse the repository at this point in the history
[stable30] fix(settings): disable Discover when appstore is disabled
  • Loading branch information
nickvergessen authored Sep 19, 2024
2 parents 0949bc7 + e49c16b commit b57a61c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
6 changes: 4 additions & 2 deletions apps/settings/src/router/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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: {
Expand Down
3 changes: 2 additions & 1 deletion apps/settings/src/views/AppStoreNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions dist/settings-apps-view-4529.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-apps-view-4529.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/settings-vue-settings-apps-users-management.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-vue-settings-apps-users-management.js.map

Large diffs are not rendered by default.

0 comments on commit b57a61c

Please sign in to comment.