mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 13:10:30 +08:00
opt: autoQuitWithoutCoreDelay input (#965)
* opt: autoQuitWithoutCoreDelay input * opt: prevent text overflow in autoQuitWithoutCoreDelay input
This commit is contained in:
parent
c506d60e66
commit
ee19749009
@ -164,19 +164,25 @@ const GeneralConfig: React.FC = () => {
|
|||||||
</SettingItem>
|
</SettingItem>
|
||||||
{autoQuitWithoutCore && (
|
{autoQuitWithoutCore && (
|
||||||
<SettingItem title={t('settings.autoQuitWithoutCoreDelay')} divider>
|
<SettingItem title={t('settings.autoQuitWithoutCoreDelay')} divider>
|
||||||
<Input
|
<div className="flex items-center gap-2">
|
||||||
size="sm"
|
<Input
|
||||||
className="w-[100px]"
|
size="sm"
|
||||||
type="number"
|
className="w-[100px]"
|
||||||
endContent={t('common.seconds')}
|
type="number"
|
||||||
value={autoQuitWithoutCoreDelay.toString()}
|
value={autoQuitWithoutCoreDelay.toString()}
|
||||||
onValueChange={async (v: string) => {
|
onValueChange={async (v: string) => {
|
||||||
let num = parseInt(v)
|
let num = parseInt(v)
|
||||||
if (isNaN(num)) num = 5
|
await patchAppConfig({ autoQuitWithoutCoreDelay: num })
|
||||||
if (num < 5) num = 5
|
}}
|
||||||
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 })
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<span className="text-default-500">{t('common.seconds')}</span>
|
||||||
|
</div>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
)}
|
)}
|
||||||
<SettingItem
|
<SettingItem
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user