fix(settings): apply a theme as soon as it is selected and restore it on cancel

PLAN 5.6 asks for the theme to take effect immediately, but it was applied
only on OK. Selecting a theme now previews it; OK saves it, and cancel, Escape
or closing the window restores the theme the dialog opened with.
This commit is contained in:
doyaGu committed 2026-10-03 09:12:36 -04:00
1 parent 1ecb48316d
commit 4a88033695
5 files changed
+109 -7

No files matched your search

+1 -1
View File
@@ -214,7 +214,7 @@ card_tags: (card_id, tag_id) 复合主键,双向 ON DELETE CASCADE
入口 = 顶部显示区域右侧"设置"按钮,承载各类全局设置:
- 语言选择(英文 / 简体中文),切换后显示"重启后生效"提示(提示文本本身为资源键)
- 主题选择(亮色 / 暗色 / 跟随系统),切换后**即时生效**,无重启提示(与语言项的行为差异)
- 主题选择(亮色 / 暗色 / 跟随系统),下拉框选中即**即时生效**(预览),无重启提示(与语言项的行为差异);点确认才写入配置,取消或关闭设置模态则恢复打开时的主题
- 四类确认开关(见 §5.5)
### 5.7 关于模态