fix(config): align visual editor with backend config semantics

This commit is contained in:
LTbinglingfeng
2026-02-06 18:14:13 +08:00
parent 26fa1ea98e
commit f833f0dfd2
8 changed files with 53 additions and 42 deletions

View File

@@ -80,9 +80,10 @@ export function ConfigPage() {
try {
const nextContent = activeTab === 'visual' ? applyVisualChangesToYaml(content) : content;
await configFileApi.saveConfigYaml(nextContent);
const latestContent = await configFileApi.fetchConfigYaml();
setDirty(false);
setContent(nextContent);
loadVisualValuesFromYaml(nextContent);
setContent(latestContent);
loadVisualValuesFromYaml(latestContent);
showNotification(t('config_management.save_success'), 'success');
} catch (err: unknown) {
const message = err instanceof Error ? err.message : '';