fix: check save result in handleSaveAll and add slate to validColors (#4823)

Signed-off-by: Micah-Zheng <102610064+Micah-Zheng@users.noreply.github.com>
This commit is contained in:
Micah-Zheng authored and GitHub committed 2026-05-19 16:15:13 +08:00
1 parent c78573ce03
commit 032993ed49
2 files changed
+5 -4

No files matched your search

@@ -250,12 +250,13 @@ export function ApiInfoSection({ enabled, data }: ApiInfoSectionProps) {
const handleSaveAll = async () => {
try {
await updateOption.mutateAsync({
const result = await updateOption.mutateAsync({
key: 'console_setting.api_info',
value: JSON.stringify(apiInfoList),
})
setHasChanges(false)
toast.success(t('API info saved successfully'))
if (result.success) {
setHasChanges(false)
}
} catch {
toast.error(t('Failed to save API info'))
}