diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Config.tsx | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/src/components/Config.tsx b/src/components/Config.tsx index 808ffd9..3243ae6 100644 --- a/src/components/Config.tsx +++ b/src/components/Config.tsx @@ -164,6 +164,7 @@ function ConfigImpl({ } setConfigState(name, value); break; + case 'enable': case 'stack': setTunConfigState(name, value); dispatch(updateConfigs(apiConfig, { 'tun': {[name]: value }})); @@ -266,17 +267,6 @@ function ConfigImpl({ </div> <div> - <div className={s0.label}>TUN Stack</div> - <Select - options={tunStackOptions} - selected={configState['tun']['stack']} - onChange={(e) => - handleChangeValue({ name: 'stack', value: e.target.value }) - } - /> - </div> - - <div> <div className={s0.label}>Allow LAN</div> <div className={s0.wrapSwitch}> <Switch @@ -286,6 +276,29 @@ function ConfigImpl({ /> </div> </div> + + <div> + <div className={s0.label}>{t('enable_tun_device')}</div> + <div className={s0.wrapSwitch}> + <Switch + checked={configState['tun']['enable']} + onChange={(value: boolean) => + handleChangeValue({ name: 'enable', value: value }) + } + /> + </div> + </div> + + <div> + <div className={s0.label}>TUN Stack</div> + <Select + options={tunStackOptions} + selected={configState['tun']['stack']} + onChange={(e) => + handleChangeValue({ name: 'stack', value: e.target.value }) + } + /> + </div> </div> <div className={s0.sep}> |
