From 5c483536b4af8692658c6b79d6985858255b5c9f Mon Sep 17 00:00:00 2001 From: wuyang <5700876+banisherwy@user.noreply.gitee.com> Date: Tue, 28 Jul 2026 14:52:11 +0800 Subject: [PATCH] refactor: move admin entry into account menu --- frontend/src/App.tsx | 32 ++++++++++++++++++-------- frontend/src/styles.css | 51 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 9 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 47f4e2a..b66d1cf 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -844,10 +844,14 @@ function AdminDashboard() { function AccountMenu({ user, + adminActive, + onOpenAdmin, onUserUpdate, onLogout, }: { user: User; + adminActive: boolean; + onOpenAdmin: () => void; onUserUpdate: (user: User) => void; onLogout: () => void; }) { @@ -867,9 +871,10 @@ function AccountMenu({ return (
@@ -879,6 +884,21 @@ function AccountMenu({ {user.label} {user.role === "admin" ? "管理员" : "独立空间"} + {user.role === "admin" && ( + + )} {user.role !== "admin" && (