@@ -116,7 +116,7 @@ export function Layout() {
116116 : 'gap-3 px-3' ,
117117 isActive
118118 ? 'bg-primary text-primary-foreground'
119- : 'text-sidebar-foreground hover:bg-muted hover:text-foreground '
119+ : 'text-sidebar-foreground hover:bg-muted'
120120 ) }
121121 title = { sidebarCollapsed ? item . title : undefined }
122122 >
@@ -155,7 +155,7 @@ export function Layout() {
155155 : 'gap-3 px-3' ,
156156 isActive
157157 ? 'bg-primary text-primary-foreground'
158- : 'text-sidebar-foreground hover:bg-muted hover:text-foreground '
158+ : 'text-sidebar-foreground hover:bg-muted'
159159 ) }
160160 title = { sidebarCollapsed ? item . title : undefined }
161161 >
@@ -179,7 +179,7 @@ export function Layout() {
179179 < div className = "mt-auto p-3" >
180180 < div className = "pt-2" >
181181 { /* 头像 */ }
182- < div className = "flex items-center gap-3 mb-3" >
182+ < div className = { cn ( "flex items-center gap-3 mb-3" , sidebarCollapsed ? "" : "ml-1" ) } >
183183 < div className = "flex h-10 w-10 items-center justify-center rounded-full bg-primary text-primary-foreground flex-shrink-0" >
184184 { user ?. username ?. charAt ( 0 ) . toUpperCase ( ) || 'U' }
185185 </ div >
@@ -189,10 +189,10 @@ export function Layout() {
189189 sidebarCollapsed ? 'opacity-0 w-0' : 'opacity-100'
190190 ) }
191191 >
192- < p className = "text-sm font-medium truncate text-sidebar-foreground whitespace-nowrap" >
192+ < p className = "text-base font-medium truncate text-sidebar-foreground whitespace-nowrap" >
193193 { user ?. full_name || user ?. username }
194194 </ p >
195- < p className = "text-xs text-sidebar-foreground/70 whitespace-nowrap" >
195+ < p className = "text-sm text-sidebar-foreground/70 whitespace-nowrap" >
196196 { user ?. role === 'admin' ? '管理员' : '用户' }
197197 </ p >
198198 </ div >
@@ -208,39 +208,39 @@ export function Layout() {
208208 ) }
209209 >
210210 < Button
211- variant = "outline "
211+ variant = "ghost "
212212 onClick = { ( ) => logout ( ) }
213213 className = { cn (
214- "text-sidebar-foreground hover:bg-muted hover:text-foreground border-0 shadow-none min-w-0 overflow-hidden flex" ,
214+ "h-10 text-sidebar-foreground text-base hover:bg-muted min-w-0 overflow-hidden flex" ,
215215 sidebarCollapsed
216216 ? "w-10 h-10 p-0 justify-center"
217217 : "flex-1 justify-start px-3"
218218 ) }
219219 title = { sidebarCollapsed ? "退出登录" : undefined }
220220 >
221- < LogOut className = "h-4 w-4 shrink-0" />
221+ < LogOut className = "size-5 shrink-0" />
222222 { ! sidebarCollapsed && (
223223 < span className = "ml-2 whitespace-nowrap" >
224224 退出登录
225225 </ span >
226226 ) }
227227 </ Button >
228228 < Button
229- variant = "outline "
229+ variant = "ghost "
230230 size = "icon"
231231 onClick = { toggleTheme }
232232 className = { cn (
233- "h-9 shrink-0 hover:bg-muted hover:text-foreground border-0 shadow-none text-sidebar-foreground" ,
233+ "size-10 shrink-0 hover:bg-muted shadow-none text-sidebar-foreground" ,
234234 sidebarCollapsed
235235 ? "w-10"
236236 : ""
237237 ) }
238238 title = { sidebarCollapsed ? ( theme === 'dark' ? '切换亮色' : '切换暗黑' ) : undefined }
239239 >
240240 { theme === 'dark' ? (
241- < Sun className = "h-4 w-4 " />
241+ < Sun className = "size-5 " />
242242 ) : (
243- < Moon className = "h-4 w-4 " />
243+ < Moon className = "size-5 " />
244244 ) }
245245 </ Button >
246246 </ div >
@@ -329,20 +329,20 @@ export function Layout() {
329329 { user ?. username ?. charAt ( 0 ) . toUpperCase ( ) || 'U' }
330330 </ div >
331331 < div className = "flex-1 min-w-0" >
332- < p className = "text-sm font-medium truncate text-sidebar-foreground" >
332+ < p className = "text-base font-medium truncate text-sidebar-foreground" >
333333 { user ?. full_name || user ?. username }
334334 </ p >
335- < p className = "text-xs text-sidebar-foreground/70" >
335+ < p className = "text-sm text-sidebar-foreground/70" >
336336 { user ?. role === 'admin' ? '管理员' : '用户' }
337337 </ p >
338338 </ div >
339339 </ div >
340340 < Button
341341 variant = "ghost"
342- className = "w-full justify-start text-sidebar-foreground hover:bg-sidebar-foreground/10 "
342+ className = "w-full text-base h-10 justify-start text-sidebar-foreground hover:bg-muted "
343343 onClick = { ( ) => logout ( ) }
344344 >
345- < LogOut className = "mr-2 h-4 w-4 " />
345+ < LogOut className = "mr-2 size-5 " />
346346 退出登录
347347 </ Button >
348348 </ div >
0 commit comments