From ee19749009a002553a2f9f9ff98c78c24833a1f6 Mon Sep 17 00:00:00 2001 From: Memory <134070804+Memory2314@users.noreply.github.com> Date: Sat, 16 Aug 2025 19:56:50 +0800 Subject: [PATCH] opt: autoQuitWithoutCoreDelay input (#965) * opt: autoQuitWithoutCoreDelay input * opt: prevent text overflow in autoQuitWithoutCoreDelay input --- .../components/settings/general-config.tsx | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/renderer/src/components/settings/general-config.tsx b/src/renderer/src/components/settings/general-config.tsx index 9ac81de..0a6b106 100644 --- a/src/renderer/src/components/settings/general-config.tsx +++ b/src/renderer/src/components/settings/general-config.tsx @@ -164,19 +164,25 @@ const GeneralConfig: React.FC = () => { {autoQuitWithoutCore && ( - { - let num = parseInt(v) - if (isNaN(num)) num = 5 - if (num < 5) num = 5 - await patchAppConfig({ autoQuitWithoutCoreDelay: num }) - }} - /> +
+ { + let num = parseInt(v) + await patchAppConfig({ autoQuitWithoutCoreDelay: num }) + }} + onBlur={async (e) => { + let num = parseInt(e.target.value) + if (isNaN(num)) num = 5 + if (num < 5) num = 5 + await patchAppConfig({ autoQuitWithoutCoreDelay: num }) + }} + /> + {t('common.seconds')} +
)}