Skip to content

Commit e36e92b

Browse files
authored
Merge pull request #35249 from nextcloud/fix/33854-User_management_pages_-_Window_title_must_change_when_switching_sidebar_sections
Set page title for each sidebar section through App management pages
2 parents 4196bf8 + bdb664c commit e36e92b

3 files changed

Lines changed: 21 additions & 4 deletions

File tree

apps/settings/src/router.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,26 @@ const router = new Router({
5555
component: Users,
5656
props: true,
5757
name: 'users',
58+
meta: {
59+
title: () => {
60+
return t('settings', 'Active users')
61+
},
62+
},
5863
children: [
5964
{
6065
path: ':selectedGroup',
6166
name: 'group',
67+
meta: {
68+
title: (to) => {
69+
if (to.params.selectedGroup === 'admin') {
70+
return t('settings', 'Admins')
71+
}
72+
if (to.params.selectedGroup === 'disabled') {
73+
return t('settings', 'Disabled users')
74+
}
75+
return decodeURIComponent(to.params.selectedGroup)
76+
},
77+
},
6278
component: Users,
6379
},
6480
],
@@ -81,7 +97,8 @@ const router = new Router({
8197
title: async (to) => {
8298
if (to.name === 'apps') {
8399
return t('settings', 'Your apps')
84-
} else if (APPS_SECTION_ENUM[to.params.category]) {
100+
}
101+
if (APPS_SECTION_ENUM[to.params.category]) {
85102
return APPS_SECTION_ENUM[to.params.category]
86103
}
87104
await store.dispatch('getCategories')

0 commit comments

Comments
 (0)