mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-08 14:39:09 +02:00
ui: auto-trigger browser login when profile switch lands on NeedsLogin
Add a second, longer-lived switchLoginWatch flag alongside switchInProgress in DaemonFeed. Suppression still clears on the first Connecting push from the new Up, but the login watcher survives past it to catch the eventual NeedsLogin / LoginFailed / SessionExpired terminal and emit EventTriggerLogin, so the React orchestrator opens the browser-login flow without a second Connect click. shouldSuppress becomes consumeForSwitch, returning both the suppress and triggerLogin signals. CancelProfileSwitch disarms the watch so an aborted switch does not pop a login window.
This commit is contained in:
@@ -26,7 +26,7 @@ func (t *Tray) onStatusEvent(ev *application.CustomEvent) {
|
||||
// otherwise spam Shell_NotifyIcon and the log.
|
||||
//
|
||||
// Profile-switch suppression lives one layer up in services/daemon_feed.go
|
||||
// (DaemonFeed.BeginProfileSwitch / shouldSuppress) so the optimistic
|
||||
// (DaemonFeed.BeginProfileSwitch / consumeForSwitch) so the optimistic
|
||||
// Connecting paint and the suppressed Idle/Connected events are shared
|
||||
// with the React Status page rather than being a tray-only behaviour.
|
||||
func (t *Tray) applyStatus(st services.Status) {
|
||||
|
||||
Reference in New Issue
Block a user