Skip to content

Commit a54b910

Browse files
authored
Merge pull request #42125 from nextcloud/backport/42112/stable28
[stable28] enh(settings): Set main page heading
2 parents e359054 + 433ef6b commit a54b910

12 files changed

Lines changed: 37 additions & 16 deletions

apps/settings/src/constants/AppsConstants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { translate as t } from '@nextcloud/l10n'
2424

2525
/** Enum of verification constants, according to Apps */
2626
export const APPS_SECTION_ENUM = Object.freeze({
27+
installed: t('settings', 'Your apps'),
2728
enabled: t('settings', 'Active apps'),
2829
disabled: t('settings', 'Disabled apps'),
2930
updates: t('settings', 'Updates'),

apps/settings/src/mixins/AppManagement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default {
5050
if (this.app.needsDownload) {
5151
return t('settings', 'The app will be downloaded from the App Store')
5252
}
53-
return false
53+
return null
5454
},
5555
forceEnableButtonTooltip() {
5656
const base = t('settings', 'This app is not marked as compatible with your Nextcloud version. If you continue you will still be able to install the app. Note that the app might not work as expected.')

apps/settings/src/views/Apps.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
:to="{ name: 'apps' }"
3232
:exact="true"
3333
icon="icon-category-installed"
34-
:name="t('settings', 'Your apps')" />
34+
:name="$options.APPS_SECTION_ENUM.installed" />
3535
<NcAppNavigationItem id="app-category-enabled"
3636
:to="{ name: 'apps-category', params: { category: 'enabled' } }"
3737
icon="icon-category-enabled"
@@ -88,7 +88,9 @@
8888
</NcAppNavigation>
8989

9090
<!-- Apps list -->
91-
<NcAppContent class="app-settings-content" :class="{ 'icon-loading': loadingList }">
91+
<NcAppContent class="app-settings-content"
92+
:class="{ 'icon-loading': loadingList }"
93+
:page-heading="pageHeading">
9294
<AppList :category="category" :app="app" :search="searchQuery" />
9395
</NcAppContent>
9496

@@ -206,6 +208,13 @@ export default {
206208
},
207209
208210
computed: {
211+
pageHeading() {
212+
if (this.$options.APPS_SECTION_ENUM[this.category]) {
213+
return this.$options.APPS_SECTION_ENUM[this.category]
214+
}
215+
const category = this.$store.getters.getCategoryById(this.category)
216+
return category.displayName
217+
},
209218
loading() {
210219
return this.$store.getters.loading('categories')
211220
},

apps/settings/src/views/Users.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
</template>
128128
</NcAppNavigation>
129129

130-
<NcAppContent>
130+
<NcAppContent :page-heading="pageHeading">
131131
<UserList :selected-group="selectedGroupDecoded"
132132
:external-actions="externalActions" />
133133
</NcAppContent>
@@ -212,6 +212,17 @@ export default {
212212
},
213213
214214
computed: {
215+
pageHeading() {
216+
if (this.selectedGroupDecoded === null) {
217+
return t('settings', 'Active users')
218+
}
219+
const matchHeading = {
220+
admin: t('settings', 'Admins'),
221+
disabled: t('settings', 'Disabled users'),
222+
}
223+
return matchHeading[this.selectedGroupDecoded] ?? t('settings', 'User group: {group}', { group: this.selectedGroupDecoded })
224+
},
225+
215226
showConfig() {
216227
return this.$store.getters.getShowConfig
217228
},

dist/core-common.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-apps-view-7418.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-apps-view-7418.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-users-8351.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-users-8351.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)