diff options
author | julia.kirschenheuter <julia.kirschenheuter@nextcloud.com> | 2022-11-18 13:10:35 +0100 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2022-12-03 19:21:45 +0000 |
commit | bdb664c399c43eb725774fe41c787e6c8caa77b5 (patch) | |
tree | b9bc33e7d2d222457d2fab8f5e940531b8796fa4 /apps | |
parent | 31ec83f2d82544741cb16836de60fc92072efca8 (diff) | |
download | nextcloud-server-bdb664c399c43eb725774fe41c787e6c8caa77b5.tar.gz nextcloud-server-bdb664c399c43eb725774fe41c787e6c8caa77b5.zip |
Adapt router.js for setting document title
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings/src/router.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/apps/settings/src/router.js b/apps/settings/src/router.js index 121a9c90a2b..863bd49c32d 100644 --- a/apps/settings/src/router.js +++ b/apps/settings/src/router.js @@ -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') |