feat(admin): groups management UI in the console

Add a super-admin-only Groups tab to create, edit and delete groups
(name, admin ids, owner scope). Routes now require a group via a select
in the editor, group names are shown on route cards, and the new
useMe/useGroups composables back the UI.
This commit is contained in:
RhenCloud 2026-08-02 08:16:05 +08:00
parent 537f4cbb84
commit 62985a2f3f
No known key found for this signature in database
GPG key ID: A574A617378C4E0B
8 changed files with 382 additions and 9 deletions

View file

@ -9,6 +9,7 @@
<span class="route-name">{{ route.name || "(untitled)" }}</span>
<span class="route-id">{{ route.id }}</span>
<span v-if="route.lang" class="badge lang">{{ route.lang }}</span>
<span v-if="groupName" class="badge group">{{ groupName }}</span>
</div>
<div class="card-actions">
<button class="icon-btn" title="Edit" @click="$emit('edit', route)"></button>
@ -33,7 +34,7 @@
import type { Route } from "~/types";
import { FILTER_LABELS, fmtMatch } from "~/types";
const props = defineProps<{ route: Route }>();
const props = defineProps<{ route: Route; groupName?: string }>();
const emit = defineEmits<{
(e: "toggle", route: Route): void;
(e: "edit", route: Route): void;