feat(meowpanel): 面板 MD3/MIUIx 双主题 × 明暗四套变量表 + 主题切换器(跟随系统/浏览器/明/暗)

- CSS:色值全量抽为 :root 变量,[data-style]×[data-mode] 四套主题表;
  MIUIx 色值对齐设备 meow_ui_theme.c(light F7F3EE/F57200、dark 181310/FF8C4A、radius 20/28、spacing 12、细描边);
  根属性 data-theme 更名 data-mode
- JS:默认联动设备 settings.conf(GET /api/theme 的 ui.style/display.theme);
  面板覆盖存 localStorage(meowpanel.style / meowpanel.mode),不写设备;
  模式 system/browser/light/dark,browser 走 prefers-color-scheme 并监听日夜切换实时生效;
  旧键 meowpanel.theme 自动迁移;顶栏切换器保留原行为(本地生效 + PUT /api/theme 同步设备)
- 设置页新增「主题(面板外观)」卡:风格 MD3/MIUIx(可一键回跟随设备)+ 明暗四选一
- 后端未改:/api/theme 已透传 ui.style/display.theme,无需新增
This commit is contained in:
MeowOS committed 2026-09-01 16:26:02 +08:00
1 parent 250c9ae8b1
commit 677c0c47ac
3 files changed
+144 -39

No files matched your search

+3 -3
View File
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="zh-CN" data-style="md3" data-theme="dark">
<html lang="zh-CN" data-style="md3" data-mode="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
@@ -88,8 +88,8 @@
<button class="seg-btn" data-style="miuix">MIUIx</button>
</div>
<div class="seg" id="theme-seg" title="明暗">
<button class="seg-btn" data-theme="dark">深色</button>
<button class="seg-btn" data-theme="light">浅色</button>
<button class="seg-btn" data-mode="dark">深色</button>
<button class="seg-btn" data-mode="light">浅色</button>
</div>
</div>
</header>