diff --git a/src/main/config/profile.ts b/src/main/config/profile.ts index 20b1dc6..10f4be4 100644 --- a/src/main/config/profile.ts +++ b/src/main/config/profile.ts @@ -129,7 +129,7 @@ export async function createProfile(item: Partial): Promise): Promise): Promise { pauseSSID = [], delayTestUrl, userAgent, + subscriptionTimeout = 30000, mihomoCpuPriority = 'PRIORITY_NORMAL', proxyCols = 'auto' } = appConfig || {} @@ -49,6 +50,27 @@ const MihomoConfig: React.FC = () => { }} > + +
+ { + let num = parseInt(v) + await patchAppConfig({ subscriptionTimeout: num * 1000 }) + }} + onBlur={async (e) => { + let num = parseInt(e.target.value) + if (isNaN(num)) num = 30 + if (num < 30) num = 30 + await patchAppConfig({ subscriptionTimeout: num * 1000 }) + }} + /> + {t('common.seconds')} +
+