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