fix(layout): 顶栏用户区去掉盾牌图标与管理员徽章,只留用户名
This commit is contained in:
1 parent
c33ea9d0a8
commit
df1075f1f5
1 file changed
+1
-8
@@ -10,7 +10,6 @@ import {
|
||||
LogOut,
|
||||
PanelLeftClose,
|
||||
PanelLeftOpen,
|
||||
Shield,
|
||||
ChevronRight,
|
||||
Activity,
|
||||
Menu,
|
||||
@@ -240,13 +239,7 @@ const Layout = memo(function Layout({ children }: { children: React.ReactNode })
|
||||
<ThemeToggle />
|
||||
{user && (
|
||||
<div className="flex items-center gap-3 text-sm text-muted-foreground">
|
||||
<div className="flex items-center gap-2">
|
||||
<Shield className="w-4 h-4" />
|
||||
<span>{user.username}</span>
|
||||
<span className="px-2 py-0.5 rounded-full bg-success/10 text-success text-xs font-medium">
|
||||
{user.role === 'admin' ? t('layout.admin') : user.role}
|
||||
</span>
|
||||
</div>
|
||||
<span>{user.username}</span>
|
||||
<button
|
||||
onClick={handleLogout}
|
||||
title={t('layout.logout')}
|
||||
|
||||
Reference in new issue
Block a user