fix(web): 系统设置 CRUD 修复 — version 乐观锁 + 语言字段映射 + JSON 显示
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

- API 层所有 Info/Request 接口添加 version 字段,update 函数传递 version
- delete 函数改为 client.delete(url, { data: { version } }) 发送 JSON body
- LanguageInfo.enabled → is_active,匹配后端 LanguageResp 字段名
- LanguageManager 编辑弹窗简化为只读详情(后端仅支持 is_active 切换)
- SystemSettings 设置值显示改用 JSON.stringify 而非 String()
- SystemSettings updateSetting 发送解析后的 JSON 对象而非字符串
This commit is contained in:
iven
2026-04-26 01:28:13 +08:00
parent b4735213c5
commit 2539e5fc44
10 changed files with 79 additions and 101 deletions

View File

@@ -5,14 +5,11 @@ import client from './client';
export interface LanguageInfo {
code: string;
name: string;
enabled: boolean;
translations?: Record<string, string>;
is_active: boolean;
}
export interface UpdateLanguageRequest {
name?: string;
enabled?: boolean;
translations?: Record<string, string>;
is_active: boolean;
}
// --- API Functions ---