@@ -209,30 +209,16 @@ export function Layout() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 暗夜模式 + 设置 */}
|
||||
<div className="flex items-center gap-1 px-1">
|
||||
{/* 暗夜模式 */}
|
||||
<div className="px-1">
|
||||
<button
|
||||
onClick={toggleDark}
|
||||
className="flex items-center gap-2 flex-1 rounded-btn px-2 py-1.5 text-xs text-foreground/70 hover:bg-elevated hover:text-foreground transition-colors"
|
||||
className="flex items-center gap-2 w-full rounded-btn px-2 py-1.5 text-xs text-foreground/70 hover:bg-elevated hover:text-foreground transition-colors"
|
||||
title={darkMode ? '切换为日间模式' : '切换为暗夜模式'}
|
||||
>
|
||||
{darkMode ? <Moon className="h-3.5 w-3.5" /> : <Sun className="h-3.5 w-3.5" />}
|
||||
<span>{darkMode ? '暗夜' : '日间'}</span>
|
||||
</button>
|
||||
<NavLink
|
||||
to="/settings"
|
||||
className={({ isActive }) =>
|
||||
cn(
|
||||
'flex items-center justify-center rounded-btn p-1.5 text-xs transition-colors',
|
||||
isActive
|
||||
? 'bg-accent/10 text-accent'
|
||||
: 'text-foreground/70 hover:bg-elevated hover:text-foreground',
|
||||
)
|
||||
}
|
||||
title="设置"
|
||||
>
|
||||
<Settings className="h-3.5 w-3.5" />
|
||||
</NavLink>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user