feat: supports silent start

This commit is contained in:
GyDi
2022-03-26 18:56:16 +08:00
parent ea8565d0ca
commit 7b7e6555c1
4 changed files with 32 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ const SettingSystem = ({ onError }: Props) => {
const {
enable_tun_mode,
enable_auto_launch,
enable_silent_start,
enable_system_proxy,
system_proxy_bypass,
enable_proxy_guard,
@@ -59,6 +60,20 @@ const SettingSystem = ({ onError }: Props) => {
</GuardState>
</SettingItem>
<SettingItem>
<ListItemText primary={t("Silent Start")} />
<GuardState
value={enable_silent_start ?? false}
valueProps="checked"
onCatch={onError}
onFormat={onSwitchFormat}
onChange={(e) => onChangeData({ enable_silent_start: e })}
onGuard={(e) => patchVergeConfig({ enable_silent_start: e })}
>
<Switch edge="end" />
</GuardState>
</SettingItem>
<SettingItem>
<ListItemText
primary={