Commit Graph
3 Commits
Author SHA1 Message Date
evgeniyChepelev ca8cf59d55 Feature/widget toggle switch UI (#138)
* feat(widget): replace action button with toggle switch control

All connection states now render as a unified toggle-style control:
green (connected), red (disconnected), orange with spinner (transitioning).

* fix(widget+auth): toggle UI, VPN state sync, and login flow fixes

* fix(widget+sdk): update Go SDK to fix/ios-debug-bundle, fix Control Center transitioning state and app disconnect flash

* fix(widget): remove transitioning states, update toggle colors and UI

* Change color indicator

* fix(widget+auth): toggle UI, VPN state sync, and login flow fixes

* fix framework version
2026-06-15 13:32:57 +02:00
evgeniyChepelev 05238a758f Widget vpn transition states (#125)
* open app immediately when login required, regardless of VPN transitioning state

Login-required check now takes priority over the connecting/disconnecting
spinner in WidgetActionButton so the user is never stuck on an animation
and can always tap through to the app's re-auth screen.

Also clears the transitioning widget state from PacketTunnelProvider when
startTunnel fails (needsLogin or adapter error) so the login button
appears without waiting for the snap-back window to expire.

* Fix widget states

* feat(widget): fix VPN transition states and improve widget reliability

* fix(widget): address code review feedback
2026-05-31 11:07:40 +02:00
evgeniyChepelev 315283822c iOS home screen widget (#78)
* Add Home Screen widget with VPN toggle and refactor app activation logic

- Add NetBirdWidgetExtension target with small/medium widget sizes
- Support direct connect/disconnect from widget via interactive buttons (iOS 17+)
- Detect missing VPN config or login-required state and open app via deep link
- Poll for stable VPN state after toggle to prevent loader getting stuck
- Add widget shared state keys to GlobalConstants and sync status from MainViewModel
- Fix false "authentication required" alert on app resume after widget disconnect
- Deduplicate app activation logic into shared startActivation/stopActivation
- Extract polling helpers: updateDetailsIfChanged, updatePeersIfChanged, applyExtensionStatus
2026-04-14 10:30:08 +02:00