mirror of
https://gh-proxy.org/https://github.com/klinsmaya/multica.git
synced 2026-11-10 02:16:45 +08:00
Adds the self-built operations UI served from the app origin under the reserved /admin slug: overview, users (with disable/enable and token revocation), workspaces, audit log, and platform admin management. The shell gates on /api/admin/me, sends signed-out visitors to /login, and hides writes a viewer cannot perform; the server enforces the same roles. Core gains an admin API client with zod-validated responses, query options and mutation hooks; views add the pages and copy in all five locales. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01FrVjAFWeckYV69HS51xUhy
12 lines
500 B
TypeScript
12 lines
500 B
TypeScript
import { AdminShell } from "@multica/views/admin";
|
|
|
|
/**
|
|
* `/admin/*` — the platform operations console, served from the same origin
|
|
* as the app so it shares the session cookie. `admin` is a reserved slug, so
|
|
* this never shadows a workspace. AdminShell redirects signed-out visitors to
|
|
* /login and shows a no-access page unless /api/admin/me grants a role.
|
|
*/
|
|
export default function AdminLayout({ children }: { children: React.ReactNode }) {
|
|
return <AdminShell>{children}</AdminShell>;
|
|
}
|