feat: 添加日间/夜间主题切换系统

- 新增 theme.js 主题管理模块(localStorage 持久化)
- variables.css 重构为亮色默认 + 暗色 data-theme 切换
- sidebar 底部添加主题切换按钮(sun/moon SVG 图标)
- 修复 scrollbar 硬编码颜色为 CSS 变量
- 修复 agents.js fallbacks 未定义时的空指针错误
This commit is contained in:
晴天
2026-02-26 23:08:21 +08:00
parent d32ce81547
commit 8bf2caf788
7 changed files with 110 additions and 22 deletions

View File

@@ -83,7 +83,7 @@ function renderConfig(page, state) {
el.querySelectorAll('[data-action="remove-fallback"]').forEach(btn => {
btn.onclick = () => {
const idx = parseInt(btn.dataset.index)
model.fallbacks.splice(idx, 1)
if (model.fallbacks) model.fallbacks.splice(idx, 1)
renderConfig(page, state)
}
})