Skip to content

Commit

Permalink
Merge pull request #48119 from nextcloud/backport/48090/stable29
Browse files Browse the repository at this point in the history
[stable29] fix(settings): disable Discover when appstore is disabled
  • Loading branch information
st3iny authored Sep 17, 2024
2 parents 1ab3441 + f8ce148 commit 14d75f0
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
@@ -1,4 +1,7 @@
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 @@ -27,11 +30,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 @@ -2,7 +2,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 14d75f0

Please sign in to comment.