fix(proxy): update system proxy state references to use configState

This commit is contained in:
Tunglies
2026-01-01 17:40:56 +08:00
parent b277a1e760
commit d75d3bd86e
2 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -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}
/>
<TabButton
isActive={activeTab === "tun"}