diff --git a/tauri-app/src/components/Layout/Sidebar.css b/tauri-app/src/components/Layout/Sidebar.css index 7b71cf3..35fd41a 100644 --- a/tauri-app/src/components/Layout/Sidebar.css +++ b/tauri-app/src/components/Layout/Sidebar.css @@ -174,23 +174,21 @@ overflow: hidden; } -.sidebar-balance { +.sidebar-balance-inline { display: flex; align-items: center; - justify-content: center; gap: var(--spacing-xs); - padding: var(--spacing-xs) var(--spacing-sm); + margin-top: 2px; cursor: pointer; - transition: background var(--transition-fast); - border-bottom: 1px solid var(--border-light); + transition: opacity var(--transition-fast); } -.sidebar-balance:hover { - background: var(--bg-hover); +.sidebar-balance-inline:hover { + opacity: 0.8; } -.sidebar-balance .balance-text { - font-size: var(--font-sm); +.sidebar-balance-inline .balance-text { + font-size: 12px; font-weight: 600; color: var(--primary); } diff --git a/tauri-app/src/components/Layout/Sidebar.tsx b/tauri-app/src/components/Layout/Sidebar.tsx index 09cf686..b5f024a 100644 --- a/tauri-app/src/components/Layout/Sidebar.tsx +++ b/tauri-app/src/components/Layout/Sidebar.tsx @@ -211,44 +211,44 @@ export default function Sidebar({ currentPath, onNavigate }: SidebarProps) { )}
-
onNavigate('profile')} - title="查看账户" - > - - - - {balance} 积分 -
setShowUserMenu(!showUserMenu)} title="菜单" > - avatar -
- {authUser?.nickname || '用户'} + avatar +
+ {authUser?.nickname || '用户'} +
{ e.stopPropagation(); onNavigate('profile'); }} + title="查看账户" + > + + + + {balance} 积分 +
+
+ + +
- - - -
{showUserMenu && (