fix: 全端隐藏用户角色标签(SUPER_ADMIN/操作员等)

This commit is contained in:
2026-08-07 14:53:46 +08:00
parent 9ed85f88bb
commit 1b4af0a7af
3 changed files with 0 additions and 11 deletions

View File

@ -14,10 +14,6 @@ export default function ProfilePage() {
// ---- 从 AuthContext 派生真实数据 ----
const displayName = user?.display_name || user?.username || "未知用户";
const avatarChar = displayName.charAt(0);
const roleLabel =
user?.role === "SUPER_ADMIN"
? "超级管理员"
: user?.role || "操作员";
function handleLogout() {
logout();
@ -47,7 +43,6 @@ export default function ProfilePage() {
<span className="block text-base font-bold text-gray-800">
{displayName}
</span>
<span className="text-xs text-gray-400">{roleLabel}</span>
</div>
<span className="text-xl text-gray-300">›</span>
</div>