refactor: 设置面板改为右侧抽屉,修复布局跳动问题

- ConfigPanel 重写为 Drawer:右侧 320px 滑入面板 + 半透明遮罩
- 设置按钮始终可见,不依赖连接状态
- 抽屉不推挤主布局,点击遮罩或✕关闭
- 设置项分组显示,带功能描述文案

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-13 16:54:57 +08:00
parent 093dc26fa0
commit f17c3c24a7
3 changed files with 158 additions and 63 deletions

View File

@@ -54,15 +54,13 @@ function App() {
<span className={`badge badge--${connectionStatus}`}>
{isConnected ? "已连接" : connectionStatus === "connecting" ? "连接中..." : "未连接"}
</span>
{isConnected && (
<button
className="btn-icon"
onClick={() => setShowConfig((v) => !v)}
title="设置"
>
</button>
)}
<button
className="btn-icon"
onClick={() => setShowConfig((v) => !v)}
title="设置"
>
</button>
</div>
</header>