@@ -209,30 +209,16 @@ export function Layout() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* 暗夜模式 + 设置 */}
|
{/* 暗夜模式 */}
|
||||||
<div className="flex items-center gap-1 px-1">
|
<div className="px-1">
|
||||||
<button
|
<button
|
||||||
onClick={toggleDark}
|
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 ? '切换为日间模式' : '切换为暗夜模式'}
|
title={darkMode ? '切换为日间模式' : '切换为暗夜模式'}
|
||||||
>
|
>
|
||||||
{darkMode ? <Moon className="h-3.5 w-3.5" /> : <Sun className="h-3.5 w-3.5" />}
|
{darkMode ? <Moon className="h-3.5 w-3.5" /> : <Sun className="h-3.5 w-3.5" />}
|
||||||
<span>{darkMode ? '暗夜' : '日间'}</span>
|
<span>{darkMode ? '暗夜' : '日间'}</span>
|
||||||
</button>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
|
|||||||
Reference in New Issue
Block a user