mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-12-24 18:54:13 +08:00
fix(config): selected option
This commit is contained in:
parent
fc96dc995a
commit
d6ce1376a6
@ -260,13 +260,16 @@ const ConfigForm: ParentComponent<{
|
||||
|
||||
<Select
|
||||
id="mode"
|
||||
value={configsData()?.mode}
|
||||
onChange={(e) =>
|
||||
void updateBackendConfigAPI('mode', e.target.value, refetch)
|
||||
}
|
||||
>
|
||||
<For each={modes()}>
|
||||
{(name) => <option value={name}>{t(name as keyof Dict)}</option>}
|
||||
{(name) => (
|
||||
<option selected={name === configsData()?.mode} value={name}>
|
||||
{t(name as keyof Dict)}
|
||||
</option>
|
||||
)}
|
||||
</For>
|
||||
</Select>
|
||||
</div>
|
||||
@ -311,7 +314,6 @@ const ConfigForm: ParentComponent<{
|
||||
|
||||
<Select
|
||||
id="tun-ip-stack"
|
||||
value={configsData()?.tun?.stack}
|
||||
onChange={(e) =>
|
||||
void updateBackendConfigAPI(
|
||||
'tun',
|
||||
@ -320,10 +322,16 @@ const ConfigForm: ParentComponent<{
|
||||
)
|
||||
}
|
||||
>
|
||||
<option>Mixed</option>
|
||||
<option>gVisor</option>
|
||||
<option>System</option>
|
||||
<option>LWIP</option>
|
||||
<For each={['Mixed', 'gVisor', 'System', 'LWIP']}>
|
||||
{(name) => (
|
||||
<option
|
||||
selected={configsData()?.tun?.stack === name}
|
||||
value={name}
|
||||
>
|
||||
{name}
|
||||
</option>
|
||||
)}
|
||||
</For>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user