merge: 同步 origin/ui-optimization(d224d5b6),保留 weiyuan 功能与 Semi 迁移
- 冲突以 weiyuan 功能(小程序登录、i18n 文案)为准,并保留远端 lint 重构与依赖收敛 - 删除 weiyuan 已移除、远端仅做 lint 修正的 3 个图片相关文件 - 适配远端零警告 ESLint:Monitoring/Subscription 改用 useEffectEvent,EditChannelModal 注明 t 依赖 - effect-events 单测补充 react-i18next mock - 对合并后仍不符合 Prettier 的文件做纯格式化
This commit is contained in:
@@ -274,14 +274,14 @@ export default function SettingsTheme(props) {
|
||||
|
||||
// 当前生效的 token(生效预设 + 自定义覆盖),用于预览
|
||||
// 依赖 presetOverridesState:管理员编辑预设模板后重算
|
||||
const effectiveLight = useMemo(
|
||||
() => ({ ...getEffectivePreset(selectedPreset).light, ...customLight }),
|
||||
[selectedPreset, customLight, presetOverridesState],
|
||||
);
|
||||
const effectiveDark = useMemo(
|
||||
() => ({ ...getEffectivePreset(selectedPreset).dark, ...customDark }),
|
||||
[selectedPreset, customDark, presetOverridesState],
|
||||
);
|
||||
const effectiveLight = {
|
||||
...getEffectivePreset(selectedPreset).light,
|
||||
...customLight,
|
||||
};
|
||||
const effectiveDark = {
|
||||
...getEffectivePreset(selectedPreset).dark,
|
||||
...customDark,
|
||||
};
|
||||
const effectivePalette =
|
||||
colorMode === 'light' ? effectiveLight : effectiveDark;
|
||||
|
||||
@@ -431,10 +431,10 @@ export default function SettingsTheme(props) {
|
||||
|
||||
/* ============ 编辑预设模板 ============ */
|
||||
// 当前编辑预设的浅色 effective(生效预设浅色 ∪ 草稿)
|
||||
const presetEditLight = useMemo(() => {
|
||||
const presetEditLight = (() => {
|
||||
const base = getEffectivePreset(editingPresetKey).light;
|
||||
return { ...base, ...presetDraft };
|
||||
}, [editingPresetKey, presetDraft, presetOverridesState]);
|
||||
})();
|
||||
|
||||
// 切换正在编辑的预设:载入其 effective 浅色作为草稿起点
|
||||
const handleSelectEditingPreset = (key) => {
|
||||
|
||||
Reference in New Issue
Block a user