mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-11 07:59:08 +02:00
[client] Address review: settings tab readiness, dock reopen cancel scope, update URL escaping
This commit is contained in:
+1
-1
@@ -381,10 +381,10 @@ func registerDockReopenHook(app *application.App, wm *services.WindowManager) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
app.Event.RegisterApplicationEventHook(events.Mac.ApplicationShouldHandleReopen, func(e *application.ApplicationEvent) {
|
app.Event.RegisterApplicationEventHook(events.Mac.ApplicationShouldHandleReopen, func(e *application.ApplicationEvent) {
|
||||||
e.Cancel()
|
|
||||||
if e.Context().HasVisibleWindows() {
|
if e.Context().HasVisibleWindows() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
e.Cancel()
|
||||||
wm.ShowMain()
|
wm.ShowMain()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,12 +196,13 @@ func (s *WindowManager) OpenSettings(tab string) {
|
|||||||
s.armReady(s.settings)
|
s.armReady(s.settings)
|
||||||
}
|
}
|
||||||
w := s.settings
|
w := s.settings
|
||||||
if fresh {
|
ready := s.ready[w.ID()]
|
||||||
|
if !ready {
|
||||||
s.pendingTab[w.ID()] = target
|
s.pendingTab[w.ID()] = target
|
||||||
}
|
}
|
||||||
s.mu.Unlock()
|
s.mu.Unlock()
|
||||||
|
|
||||||
if !fresh {
|
if ready {
|
||||||
s.app.Event.Emit(EventSettingsOpen, target)
|
s.app.Event.Emit(EventSettingsOpen, target)
|
||||||
}
|
}
|
||||||
s.showWhenReady(w)
|
s.showWhenReady(w)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
neturl "net/url"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -190,7 +191,7 @@ func (u *trayUpdater) openProgressWindow(version string) {
|
|||||||
}
|
}
|
||||||
url := "/#/update"
|
url := "/#/update"
|
||||||
if version != "" {
|
if version != "" {
|
||||||
url += "?version=" + version
|
url += "?version=" + neturl.QueryEscape(version)
|
||||||
}
|
}
|
||||||
u.showMainAt(url)
|
u.showMainAt(url)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user