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

View File

@@ -18,13 +18,18 @@ export const useSystemProxyState = () => {
const getSystemProxyActualState = () => {
const userEnabled = enable_system_proxy ?? false;
// 用户配置状态应该与系统实际状态一致
// 如果用户启用了系统代理,检查实际的系统状态
if (userEnabled) {
return true;
if (proxy_auto_config) {
return autoproxy?.enable ?? false;
} else {
return sysproxy?.enable ?? false;
}
}
return autoproxy?.enable === false && sysproxy?.enable === false
? false
: userEnabled;
// 用户没有启用时,返回 false
return false;
};
const getSystemProxyIndicator = () => {