fix: resolve system proxy status detection and display inconsistency

- Fixed getSystemProxyActualState logic to properly check actual system status
- Unified system proxy state display across all components
- Replaced systemProxyIndicator with actualState for consistent UI display
- Updated components: setting-system, ProxyControlSwitches, proxy-tun-card
- Added entry to v2.4.0 changelog
This commit is contained in:
Tunglies
2025-08-07 02:18:50 +08:00
parent 8046dad56d
commit 3f5cd6c26a
6 changed files with 21 additions and 21 deletions
@@ -40,11 +40,8 @@ const ProxyControlSwitches = ({ label, onError }: ProxySwitchProps) => {
const theme = useTheme();
const { installServiceAndRestartCore } = useServiceInstaller();
const {
actualState: systemProxyActualState,
indicator: systemProxyIndicator,
toggleSystemProxy,
} = useSystemProxyState();
const { actualState: systemProxyActualState, toggleSystemProxy } =
useSystemProxyState();
const { data: runningMode } = useSWR("getRunningMode", getRunningMode);
@@ -99,7 +96,7 @@ const ProxyControlSwitches = ({ label, onError }: ProxySwitchProps) => {
}}
>
<Box sx={{ display: "flex", alignItems: "center" }}>
{systemProxyIndicator ? (
{systemProxyActualState ? (
<PlayCircleOutlineRounded
sx={{ color: "success.main", mr: 1.5, fontSize: 28 }}
/>