Skip to content

Commit

Permalink
enh(settings): Set main heading for User management
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed Dec 8, 2023
1 parent 4cbc8b6 commit bf3a8d1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion apps/settings/src/views/Users.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
</template>
</NcAppNavigation>

<NcAppContent>
<NcAppContent :page-heading="pageHeading">
<UserList :selected-group="selectedGroupDecoded"
:external-actions="externalActions" />
</NcAppContent>
Expand Down Expand Up @@ -212,6 +212,17 @@ export default {
},

computed: {
pageHeading() {
if (this.selectedGroupDecoded === null) {
return t('settings', 'Active users')
}
const matchHeading = {
admin: t('settings', 'Admins'),
disabled: t('settings', 'Disabled users'),
}
return matchHeading[this.selectedGroupDecoded] ?? t('settings', 'User group: {group}', { group: this.selectedGroupDecoded })
},

showConfig() {
return this.$store.getters.getShowConfig
},
Expand Down

0 comments on commit bf3a8d1

Please sign in to comment.