Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
enh(settings): Set main heading for Apps
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal authored and backportbot-nextcloud[bot] committed Dec 8, 2023
commit 291e56d272edc961f4f295c7722efe4789a519e7
1 change: 1 addition & 0 deletions apps/settings/src/constants/AppsConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { translate as t } from '@nextcloud/l10n'

/** Enum of verification constants, according to Apps */
export const APPS_SECTION_ENUM = Object.freeze({
installed: t('settings', 'Your apps'),
enabled: t('settings', 'Active apps'),
disabled: t('settings', 'Disabled apps'),
updates: t('settings', 'Updates'),
Expand Down
13 changes: 11 additions & 2 deletions apps/settings/src/views/Apps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
:to="{ name: 'apps' }"
:exact="true"
icon="icon-category-installed"
:name="t('settings', 'Your apps')" />
:name="$options.APPS_SECTION_ENUM.installed" />
<NcAppNavigationItem id="app-category-enabled"
:to="{ name: 'apps-category', params: { category: 'enabled' } }"
icon="icon-category-enabled"
Expand Down Expand Up @@ -88,7 +88,9 @@
</NcAppNavigation>

<!-- Apps list -->
<NcAppContent class="app-settings-content" :class="{ 'icon-loading': loadingList }">
<NcAppContent class="app-settings-content"
:class="{ 'icon-loading': loadingList }"
:page-heading="pageHeading">
<AppList :category="category" :app="app" :search="searchQuery" />
</NcAppContent>

Expand Down Expand Up @@ -206,6 +208,13 @@ export default {
},

computed: {
pageHeading() {
if (this.$options.APPS_SECTION_ENUM[this.category]) {
return this.$options.APPS_SECTION_ENUM[this.category]
}
const category = this.$store.getters.getCategoryById(this.category)
return category.displayName
},
loading() {
return this.$store.getters.loading('categories')
},
Expand Down