mirror of
				https://github.com/bolucat/Archive.git
				synced 2025-10-31 20:03:10 +08:00 
			
		
		
		
	Update On Wed Oct 30 19:35:31 CET 2024
This commit is contained in:
		| @@ -7,6 +7,7 @@ import { useVerge } from "@/hooks/use-verge"; | ||||
| import { DialogRef, Notice, Switch } from "@/components/base"; | ||||
| import { SettingList, SettingItem } from "./mods/setting-comp"; | ||||
| import { GuardState } from "./mods/guard-state"; | ||||
| import { ServiceSwitcher } from "./mods/service-switcher"; | ||||
| import { SysproxyViewer } from "./mods/sysproxy-viewer"; | ||||
| import { TunViewer } from "./mods/tun-viewer"; | ||||
| import { TooltipIcon } from "@/components/base/base-tooltip-icon"; | ||||
| @@ -66,15 +67,34 @@ const SettingSystem = ({ onError }: Props) => { | ||||
|           onCatch={onError} | ||||
|           onFormat={onSwitchFormat} | ||||
|           onChange={(e) => { | ||||
|             onChangeData({ enable_tun_mode: e }); | ||||
|             if (serviceStatus !== "active") { | ||||
|               onChangeData({ enable_tun_mode: false }); | ||||
|             } else { | ||||
|               onChangeData({ enable_tun_mode: e }); | ||||
|             } | ||||
|           }} | ||||
|           onGuard={(e) => { | ||||
|             return patchVerge({ enable_tun_mode: e }); | ||||
|             if (serviceStatus !== "active" && e) { | ||||
|               Notice.error(t("Please Enable Service Mode")); | ||||
|               return Promise.resolve(); | ||||
|             } else { | ||||
|               return patchVerge({ enable_tun_mode: e }); | ||||
|             } | ||||
|           }} | ||||
|         > | ||||
|           <Switch edge="end" /> | ||||
|         </GuardState> | ||||
|       </SettingItem> | ||||
|  | ||||
|       <SettingItem label={t("Service Mode")}> | ||||
|         <ServiceSwitcher | ||||
|           status={serviceStatus ?? "unknown"} | ||||
|           mutate={mutateServiceStatus} | ||||
|           patchVerge={patchVerge} | ||||
|           onChangeData={onChangeData} | ||||
|         /> | ||||
|       </SettingItem> | ||||
|  | ||||
|       <SettingItem | ||||
|         label={t("System Proxy")} | ||||
|         extra={ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 github-action[bot]
					github-action[bot]