Tunglies 44adf55975
fix(proxy): sync system proxy switch state with background highlight #5240, #5439, #5421, #4651, #4536
Fixed race condition where button state and background color would desync
during rapid toggles or slow backend responses.

Root causes:
- Button used actualState while background used configState
- toggleSystemProxy returned immediately via setTimeout(0), releasing lock
  before backend operation completed
- 100ms delay in updateProxyStatus caused visual flash

Changes:
- Unified state source: both button and background now use actualState
- Made toggleSystemProxy truly async with proper await chain
- Wrapped toggle function with useLockFn to serialize operations
- Reduced state refresh delay from 100ms to 50ms
- Fixed GuardState lock release timing for async operations
- Added proper error rollback with state refresh on failure

Resolves issue where proxy toggle button would show as off while
background remained green, or vice versa.
2025-11-23 12:17:52 +08:00
..
2025-11-17 07:41:37 +08:00
2025-11-08 19:40:38 +08:00
2025-10-15 18:57:44 +08:00
2025-11-19 17:04:19 +08:00
2025-10-14 22:13:14 +08:00
2025-11-08 19:40:38 +08:00
2025-11-08 19:40:38 +08:00
2025-11-08 19:40:38 +08:00
2025-03-16 12:15:35 +08:00