refactor(admin): 管理后台 UI - 独立设计系统并与用户端隔离
把后台 token、Ant 主题、壳层控件和抽屉弹窗从用户工作台拆开,去掉树状侧栏装饰线,色板仍用原来的中性黑白台阶。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { useUserStore } from "@/stores/use-user-store";
|
||||
import { AdminProvider } from "./admin-context";
|
||||
import { AdminShell } from "./components/admin-shell";
|
||||
import "./theme/admin-tokens.css";
|
||||
import "./theme/admin-chrome.css";
|
||||
|
||||
export default function AdminPage() {
|
||||
const actor = useUserStore((state) => state.user);
|
||||
@@ -9,10 +11,10 @@ export default function AdminPage() {
|
||||
if (!hydrated) return null;
|
||||
if (actor?.role !== "admin") {
|
||||
return (
|
||||
<main className="app-workspace-page min-h-dvh px-6 py-10 text-foreground">
|
||||
<div className="mx-auto max-w-3xl rounded-lg border border-border bg-[var(--workspace-surface)] p-6">
|
||||
<h1 className="text-2xl font-semibold">无权限</h1>
|
||||
<p className="mt-2 text-sm text-foreground/55">当前账号不是管理员,无法访问后台。</p>
|
||||
<main data-admin-root className="admin-unauthorized">
|
||||
<div className="admin-unauthorized-card">
|
||||
<h1>无权限</h1>
|
||||
<p>当前账号不是管理员,无法访问后台。</p>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user