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
pull/35603/head
Simon L 2022-12-05 12:12:00 +07:00 committed by GitHub
commit e36e92bace
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 4 deletions

@ -55,10 +55,26 @@ const router = new Router({
component: Users,
props: true,
name: 'users',
meta: {
title: () => {
return t('settings', 'Active users')
},
},
children: [
{
path: ':selectedGroup',
name: 'group',
meta: {
title: (to) => {
if (to.params.selectedGroup === 'admin') {
return t('settings', 'Admins')
}
if (to.params.selectedGroup === 'disabled') {
return t('settings', 'Disabled users')
}
return decodeURIComponent(to.params.selectedGroup)
},
},
component: Users,
},
],
@ -81,7 +97,8 @@ const router = new Router({
title: async (to) => {
if (to.name === 'apps') {
return t('settings', 'Your apps')
} else if (APPS_SECTION_ENUM[to.params.category]) {
}
if (APPS_SECTION_ENUM[to.params.category]) {
return APPS_SECTION_ENUM[to.params.category]
}
await store.dispatch('getCategories')

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long