refactor(sidebar): remove lightning icon, adjust avatar/text layout

- Remove lightning bolt SVG from balance display
- Increase avatar size (32px -> 36px)
- Tighten nickname/balance spacing in user-info
- Adjust user-name font weight (500 -> 600) and size (var(--font-sm) -> 14px)
- Reduce sidebar-user justify-content: center -> default (flex-start)
This commit is contained in:
小鱼开发
2026-05-22 15:33:10 +08:00
parent 7f43795b2e
commit a7c81c14eb
2 changed files with 9 additions and 30 deletions
+8 -20
View File
@@ -174,31 +174,18 @@
overflow: hidden;
}
.sidebar-balance-inline {
display: flex;
align-items: center;
gap: var(--spacing-xs);
margin-top: 2px;
cursor: pointer;
transition: opacity var(--transition-fast);
}
.sidebar-balance-inline:hover {
opacity: 0.8;
}
.sidebar-balance-inline .balance-text {
.sidebar-balance-text {
font-size: 12px;
font-weight: 600;
color: var(--primary);
margin-top: 2px;
}
.sidebar-user {
display: flex;
align-items: center;
justify-content: center;
gap: var(--spacing-sm);
padding: var(--spacing-sm);
padding: var(--spacing-sm) var(--spacing-md);
cursor: pointer;
transition: background var(--transition-fast);
}
@@ -208,8 +195,8 @@
}
.user-avatar {
width: 32px;
height: 32px;
width: 36px;
height: 36px;
border-radius: var(--radius-full);
background: var(--primary-gradient);
color: var(--text-inverse);
@@ -226,11 +213,12 @@
flex-direction: column;
min-width: 0;
flex: 1;
gap: 1px;
}
.user-name {
font-size: var(--font-sm);
font-weight: 500;
font-size: 14px;
font-weight: 600;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
+1 -10
View File
@@ -224,16 +224,7 @@ export default function Sidebar({ currentPath, onNavigate }: SidebarProps) {
/>
<div className="user-info">
<span className="user-name">{authUser?.nickname || '用户'}</span>
<div
className="sidebar-balance-inline"
onClick={(e) => { e.stopPropagation(); onNavigate('profile'); }}
title="查看账户"
>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#36b26a" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />
</svg>
<span className="balance-text">{balance} </span>
</div>
<span className="sidebar-balance-text">{balance} </span>
</div>
<svg
className={`user-chevron ${showUserMenu ? 'expanded' : ''}`}