feat(cc-config): edit settings.json values from the dashboard

Replace the batch multi-key settings.json editor with a recursive per-leaf
editor: each scalar value gets its own inline edit control, the dotted path
is rebuilt from the node's ancestry, and a redacted value renders as a
static non-editable chip. Saves go straight through the existing
PATCH /api/cc-config/settings per-key merge.
This commit is contained in:
2026-09-09 08:44:57 +07:00
parent 2ade30f670
commit ce64132771
4 changed files with 474 additions and 167 deletions
+5 -5
View File
@@ -331,12 +331,12 @@
"settingsKeyPlaceholder": "key or dotted.path",
"settingsValue": "Value (JSON)",
"settingsAddKey": "Add key",
"settingsRemoveKey": "Remove key",
"settingsEmptyKey": "A key name cannot be empty.",
"settingsDupKey": "Key {{key}} is listed twice.",
"settingsBadJson": "Value of {{key}} is not valid JSON.",
"settingsSaved": "Settings saved to {{file}}.",
"settingsHelp": "Values are JSON: \"opus\", true, 42, [\"a\"], {\"k\":1}. Only the keys you change are written; the rest of the file is left as-is.",
"settingsRedactedKeys": "Not editable here because their values are redacted: {{keys}}"
"editKey": "Edit {{key}}",
"settingsKeySaved": "Saved {{key}} · backup at {{backup}}",
"settingsLastBackup": "Saved {{key}} · backup at {{backup}}",
"settingsRedactedTooltip": "The dashboard never received this value.",
"settingsRedactedChip": "redacted"
}
}
+5 -5
View File
@@ -326,12 +326,12 @@
"settingsKeyPlaceholder": "key hoặc dotted.path",
"settingsValue": "Giá trị (JSON)",
"settingsAddKey": "Thêm khóa",
"settingsRemoveKey": "Xóa khóa",
"settingsEmptyKey": "Tên khóa không được để trống.",
"settingsDupKey": "Khóa {{key}} bị lặp hai lần.",
"settingsBadJson": "Giá trị của {{key}} không phải JSON hợp lệ.",
"settingsSaved": "Đã lưu settings vào {{file}}.",
"settingsHelp": "Giá trị là JSON: \"opus\", true, 42, [\"a\"], {\"k\":1}. Chỉ những khóa bạn sửa mới được ghi; phần còn lại của file giữ nguyên.",
"settingsRedactedKeys": "Không sửa được ở đây vì giá trị đã bị che: {{keys}}"
"editKey": "Sửa {{key}}",
"settingsKeySaved": "Đã lưu {{key}} · bản sao lưu tại {{backup}}",
"settingsLastBackup": "Đã lưu {{key}} · bản sao lưu tại {{backup}}",
"settingsRedactedTooltip": "Dashboard chưa từng nhận được giá trị này.",
"settingsRedactedChip": "đã che"
}
}