]> source.dussan.org Git - nextcloud-server.git/commitdiff
enh(settings): Set main heading for Apps
authorChristopher Ng <chrng8@gmail.com>
Fri, 8 Dec 2023 02:53:32 +0000 (18:53 -0800)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Fri, 8 Dec 2023 16:15:40 +0000 (16:15 +0000)
Signed-off-by: Christopher Ng <chrng8@gmail.com>
apps/settings/src/constants/AppsConstants.js
apps/settings/src/views/Apps.vue

index aec06aded3a584bb341042cf1e76e9e75c7a3379..8df7d44815a7c8a7981e75e41da92c417e8c4b4b 100644 (file)
@@ -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'),
index 1a2fbcb15385aab94dcb0b646cb38b15b2a2c592..b5cfad5632fd57d9eb706cc57aa6abb1b235877a 100644 (file)
@@ -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"
@@ -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>
 
@@ -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')
                },