From d75d3bd86e9e0b8a8694ad8532775d1dbbebf28e Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Thu, 1 Jan 2026 17:40:56 +0800 Subject: [PATCH] fix(proxy): update system proxy state references to use configState --- src/components/home/proxy-tun-card.tsx | 8 ++++---- src/components/shared/proxy-control-switches.tsx | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/home/proxy-tun-card.tsx b/src/components/home/proxy-tun-card.tsx index b17ee8780..de597a953 100644 --- a/src/components/home/proxy-tun-card.tsx +++ b/src/components/home/proxy-tun-card.tsx @@ -143,7 +143,7 @@ export const ProxyTunCard: FC = () => { const { verge } = useVerge(); const { isTunModeAvailable } = useSystemState(); - const { actualState: systemProxyActualState } = useSystemProxyState(); + const { configState: systemProxyConfigState } = useSystemProxyState(); const { enable_tun_mode } = verge ?? {}; @@ -159,7 +159,7 @@ export const ProxyTunCard: FC = () => { const tabDescription = useMemo(() => { if (activeTab === "system") { return { - text: systemProxyActualState + text: systemProxyConfigState ? t("home.components.proxyTun.status.systemProxyEnabled") : t("home.components.proxyTun.status.systemProxyDisabled"), tooltip: t("home.components.proxyTun.tooltips.systemProxy"), @@ -176,7 +176,7 @@ export const ProxyTunCard: FC = () => { } }, [ activeTab, - systemProxyActualState, + systemProxyConfigState, enable_tun_mode, isTunModeAvailable, t, @@ -199,7 +199,7 @@ export const ProxyTunCard: FC = () => { onClick={() => handleTabChange("system")} icon={ComputerRounded} label={t("settings.sections.system.toggles.systemProxy")} - hasIndicator={systemProxyActualState} + hasIndicator={systemProxyConfigState} /> sysproxyRef.current?.open()} onToggle={(value) => toggleSystemProxy(value)} onError={onError} - highlight={systemProxyActualState} + highlight={systemProxyConfigState} /> )}