feat(ui): add collapsible persistent sidebar
This commit is contained in:
1 parent
9ce71795b8
commit
101d2164b4
13 files changed
+153
-29
No files matched your search
@@ -216,6 +216,23 @@ export default function SettingsView() {
|
||||
<span className="w-12 text-right text-xs tabular-nums text-txt-muted">{settings.sidebarWidth}px</span>
|
||||
</div>
|
||||
</SettingRow>
|
||||
<SettingRow label="折叠侧栏" description="隐藏会话树以专心操作终端,可用 Ctrl/Cmd+B 切换">
|
||||
<button
|
||||
type="button"
|
||||
role="switch"
|
||||
aria-checked={settings.sidebarCollapsed}
|
||||
onClick={() => setSetting('sidebarCollapsed', !settings.sidebarCollapsed)}
|
||||
className={`relative h-6 w-11 rounded-full transition-colors ${
|
||||
settings.sidebarCollapsed ? 'bg-accent-blue' : 'bg-dark-600'
|
||||
}`}
|
||||
>
|
||||
<span
|
||||
className={`absolute top-0.5 left-0.5 h-5 w-5 rounded-full bg-white transition-transform ${
|
||||
settings.sidebarCollapsed ? 'translate-x-5' : 'translate-x-0'
|
||||
}`}
|
||||
/>
|
||||
</button>
|
||||
</SettingRow>
|
||||
</SettingGroup>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user