diff --git a/src/components/setting/setting-system.tsx b/src/components/setting/setting-system.tsx index fdb4325b..69c08855 100644 --- a/src/components/setting/setting-system.tsx +++ b/src/components/setting/setting-system.tsx @@ -54,10 +54,6 @@ const SettingSystem = ({ onError }: Props) => { proxy_auto_config, } = verge ?? {}; - const isProxyEnabled = proxy_auto_config - ? autoproxy?.enable - : sysproxy?.enable; - const onSwitchFormat = (_e: any, value: boolean) => value; const onChangeData = (patch: Partial) => { mutateVerge({ ...verge, ...patch }, false); @@ -149,7 +145,13 @@ const SettingSystem = ({ onError }: Props) => { icon={SettingsRounded} onClick={() => sysproxyRef.current?.open()} /> - {isProxyEnabled ? ( + {proxy_auto_config ? ( + autoproxy?.enable ? ( + + ) : ( + + ) + ) : sysproxy?.enable ? ( ) : ( diff --git a/src/pages/_layout.tsx b/src/pages/_layout.tsx index d5b93573..b9a9eadf 100644 --- a/src/pages/_layout.tsx +++ b/src/pages/_layout.tsx @@ -166,9 +166,12 @@ const Layout = () => { }), // verge 配置更新监听 - addListener("verge://refresh-verge-config", () => - mutate("getVergeConfig"), - ), + addListener("verge://refresh-verge-config", () => { + mutate("getVergeConfig"); + // 添加对系统代理状态的刷新 + mutate("getSystemProxy"); + mutate("getAutotemProxy"); + }), // 通知消息监听 addListener("verge://notice-message", ({ payload }) =>