mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
feat(console): give each group its own routes URL
Resolve the selected group from /admin/groups/{groupId}, validate console paths, and use browser history for back navigation. Keep Groups active and let an active mobile-tab tap return to the list. Scope pending route loads to their group and retain the count beside long headings.
This commit is contained in:
1 parent
ba95456e67
commit
535bfa98ce
11 files changed
+249
-63
No files matched your search
@@ -8,6 +8,8 @@ export function useGroupsApi() {
|
||||
const roles = ref<Record<string, GroupRole>>({});
|
||||
const loading = ref(false);
|
||||
const error = ref("");
|
||||
/** A load has succeeded: an id missing from `groups` really is unknown. */
|
||||
const loaded = ref(false);
|
||||
|
||||
function roleOf(groupId: string): GroupRole | undefined {
|
||||
return isSuper.value ? "owner" : roles.value[groupId];
|
||||
@@ -36,6 +38,7 @@ export function useGroupsApi() {
|
||||
groups.value = data.groups ?? [];
|
||||
isSuper.value = data.isSuper ?? false;
|
||||
roles.value = data.roles ?? {};
|
||||
loaded.value = true;
|
||||
} catch (err) {
|
||||
if (!needLogin.value) error.value = err instanceof Error ? err.message : String(err);
|
||||
} finally {
|
||||
@@ -67,6 +70,7 @@ export function useGroupsApi() {
|
||||
canEditGroup,
|
||||
canEditRoutes,
|
||||
loading,
|
||||
loaded,
|
||||
needLogin,
|
||||
error,
|
||||
load,
|
||||
|
||||
Reference in new issue
Block a user