feat: 全站亮色/暗色主题切换
实现方案: CSS自定义属性 + Tailwind arbitrary values 新增文件: - web/app/vendor/theme.css — CSS变量定义(亮色+暗色) 修改文件 (15个HTML + 2个JS + 2个Python): - layout.js — 侧边栏🌙主题切换按钮 + loadTheme/toggleTheme - settings.py — MUTABLE_KEYS加theme/editor_theme - 15个HTML页面 — bg-slate-*替换为bg-[var(--bg-*)] + 引入theme.css 替换统计: - index.html: 48处 - servers.html: 183处 - files.html: 94处 - push.html: 157处 - scripts.html: 83处 - credentials.html: 100处 - schedules.html: 59处 - retries.html: 40处 - commands.html: 57处 - alerts.html: 47处 - audit.html: 32处 - settings.html: 125处 - terminal.html: 89处 - install.html: 72处 - login.html: 14处 总计: 1199处替换 功能: - 侧边栏底部🌙/☀️按钮切换亮色/暗色 - 主题偏好保存到MySQL(settings表) - 页面加载时自动恢复主题 - Monaco编辑器主题独立控制(⚙️菜单)
This commit is contained in:
@@ -46,6 +46,7 @@ MUTABLE_KEYS: set[str] = {
|
||||
"notify_recovery", "notify_time_drift",
|
||||
"notify_system_redis", "notify_system_mysql", "notify_restart",
|
||||
"editor_theme", # Monaco editor theme preference
|
||||
"theme", # 全站主题 (dark/light)
|
||||
}
|
||||
|
||||
# S-02: Per-key validation rules: (type, min, max) for int settings
|
||||
|
||||
Reference in New Issue
Block a user