mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
perf: Improve config validation error messages and handling
This commit is contained in:
@@ -58,19 +58,19 @@ const handleNoticeMessage = (
|
||||
Notice.error(msg);
|
||||
break;
|
||||
case "config_validate::boot_error":
|
||||
Notice.error(t("Boot Config Validation Failed"));
|
||||
Notice.error(`${t("Boot Config Validation Failed")} ${msg}`);
|
||||
break;
|
||||
case "config_validate::core_change":
|
||||
Notice.error(t("Core Change Config Validation Failed"));
|
||||
Notice.error(`${t("Core Change Config Validation Failed")} ${msg}`);
|
||||
break;
|
||||
case "config_validate::error":
|
||||
Notice.error(t("Config Validation Failed"));
|
||||
Notice.error(`${t("Config Validation Failed")} ${msg}`);
|
||||
break;
|
||||
case "config_validate::process_terminated":
|
||||
Notice.error(t("Config Validation Process Terminated"));
|
||||
break;
|
||||
case "config_validate::stderr_error":
|
||||
Notice.error(msg);
|
||||
case "config_validate::stdout_error":
|
||||
Notice.error(`${t("Config Validation Failed")} ${msg}`);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -174,11 +174,11 @@ const ProfilePage = () => {
|
||||
}, 100);
|
||||
|
||||
try {
|
||||
await patchProfiles({ current: profile });
|
||||
const success = await patchProfiles({ current: profile });
|
||||
await mutateLogs();
|
||||
closeAllConnections();
|
||||
await activateSelected();
|
||||
if (notifySuccess) {
|
||||
if (notifySuccess && success) {
|
||||
Notice.success(t("Profile Switched"), 1000);
|
||||
}
|
||||
} catch (err: any) {
|
||||
|
||||
Reference in New Issue
Block a user