chore: after saving the configuration file, restart the core

This commit is contained in:
huzibaca 2024-12-24 02:22:46 +08:00
parent f0d953ff59
commit 0669f7a10b
No known key found for this signature in database
GPG Key ID: D4364EE4851DC302

View File

@ -27,6 +27,7 @@ import { useTranslation } from "react-i18next";
import { import {
importProfile, importProfile,
enhanceProfiles, enhanceProfiles,
restartCore,
getRuntimeLogs, getRuntimeLogs,
deleteProfile, deleteProfile,
updateProfile, updateProfile,
@ -399,7 +400,8 @@ const ProfilePage = () => {
onEdit={() => viewerRef.current?.edit(item)} onEdit={() => viewerRef.current?.edit(item)}
onSave={async (prev, curr) => { onSave={async (prev, curr) => {
if (prev !== curr && profiles.current === item.uid) { if (prev !== curr && profiles.current === item.uid) {
await onEnhance(false); await restartCore();
Notice.success(t("Clash Core Restarted"), 1000);
} }
}} }}
onDelete={() => onDelete(item.uid)} onDelete={() => onDelete(item.uid)}