fix: 修复主题模板在设置页预览时不生效的问题

根因: applyThemeTemplate 读/写 this.config,但设置页预览
走的是 pendingUserCfg(临时编辑缓存),模板值在选择后只写入了
pendingUserCfg.THEME_TEMPLATE,applyThemeTemplate 读 this.config
则一直为 system/d 返回,导致模板不生效。

修复:
- applyThemeTemplate 接受 preview 参数,预览态从 pendingUserCfg
  读写,非预览态从 this.config 读写
- getPanelBgColorInt/getPanelTextColorInt 预览态优先从
  pendingUserCfg 读取那4个颜色配置
This commit is contained in:
7015725
2026-05-15 02:00:25 +08:00
parent d2abbcca9f
commit 49d73786bf
3 changed files with 33 additions and 24 deletions

View File

@@ -14,8 +14,8 @@
"size": 5598
},
"th_04_theme.js": {
"sha256": "6bfa24d75ca23ba6c7f09b94492a63e8af2437be1bf25b79eb96089667935361",
"size": 41166
"sha256": "09a6fd1087cffd0a77aa72212f1c7ce15b145bbc9084c0f159e70e02397006c6",
"size": 41425
},
"th_05_persistence.js": {
"sha256": "d80787c2810839ebbe499e93db3df33d6e8d2d6b6ae71644ce351db0f36e4d3e",
@@ -68,5 +68,5 @@
},
"keyId": "toolhub-targets-2026-rsa3072",
"schema": 2,
"version": 20260514175655
"version": 20260514180021
}