From fb5dd8a25942de1884fb9c5af2109e5e3098ad43 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Fri, 30 Aug 2024 16:29:57 -0700 Subject: [PATCH] feat(settings): Namespace group routes Signed-off-by: Christopher Ng --- .../lib/Controller/UsersController.php | 5 +-- .../settings/src/components/GroupListItem.vue | 6 ++-- apps/settings/src/components/UserList.vue | 32 ++++++++++++------- .../src/components/Users/NewUserDialog.vue | 4 +-- .../src/composables/useGroupsNavigation.ts | 10 +++--- apps/settings/src/router/routes.ts | 19 +++++++++-- apps/settings/src/store/users.js | 14 +++++--- apps/settings/src/views/UserManagement.vue | 27 +++++++++++++++- .../src/views/UserManagementNavigation.vue | 27 ++++++++++------ 9 files changed, 104 insertions(+), 40 deletions(-) diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index 4ee359b6fe9b6..8b153a86ca829 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -170,7 +170,7 @@ public function usersList(): TemplateResponse { } $recentUsersGroup = [ - 'id' => '__nc_internal_recent', + 'id' => 'recent', 'name' => $this->l10n->t('Recently active'), 'usercount' => $userCount, ]; @@ -203,7 +203,8 @@ public function usersList(): TemplateResponse { /* FINAL DATA */ $serverData = []; // groups - $serverData['groups'] = array_merge_recursive($adminGroup, [$recentUsersGroup, $disabledUsersGroup], $groups); + $serverData['sectionGroups'] = [$recentUsersGroup, $disabledUsersGroup]; + $serverData['groups'] = array_merge($adminGroup, $groups); // Various data $serverData['isAdmin'] = $isAdmin; $serverData['isDelegatedAdmin'] = $isDelegatedAdmin; diff --git a/apps/settings/src/components/GroupListItem.vue b/apps/settings/src/components/GroupListItem.vue index 44b0605c9de4f..ec5295b82d020 100644 --- a/apps/settings/src/components/GroupListItem.vue +++ b/apps/settings/src/components/GroupListItem.vue @@ -31,7 +31,7 @@ @@ -45,7 +45,7 @@ -