Skip to content

Commit 0f8ae14

Browse files
committed
Remove updater window from main UI
1 parent 0034d1f commit 0f8ae14

File tree

3 files changed

+4
-135
lines changed

3 files changed

+4
-135
lines changed

client/ui/client_ui.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,13 @@ func main() {
9999
showLoginURL: flags.showLoginURL,
100100
showDebug: flags.showDebug,
101101
showProfiles: flags.showProfiles,
102-
showUpdate: flags.showUpdate,
103102
})
104103

105104
// Watch for theme/settings changes to update the icon.
106105
go watchSettingsChanges(a, client)
107106

108107
// Run in window mode if any UI flag was set.
109-
if flags.showSettings || flags.showNetworks || flags.showDebug || flags.showLoginURL || flags.showProfiles || flags.showUpdate {
108+
if flags.showSettings || flags.showNetworks || flags.showDebug || flags.showLoginURL || flags.showProfiles {
110109
a.Run()
111110
return
112111
}
@@ -134,7 +133,6 @@ type cliFlags struct {
134133
showDebug bool
135134
showLoginURL bool
136135
errorMsg string
137-
showUpdate bool
138136
saveLogsInFile bool
139137
}
140138

@@ -154,7 +152,6 @@ func parseFlags() *cliFlags {
154152
flag.StringVar(&flags.errorMsg, "error-msg", "", "displays an error message window")
155153
flag.BoolVar(&flags.saveLogsInFile, "use-log-file", false, fmt.Sprintf("save logs in a file: %s/netbird-ui-PID.log", os.TempDir()))
156154
flag.BoolVar(&flags.showLoginURL, "login-url", false, "show login URL in a popup window")
157-
flag.BoolVar(&flags.showUpdate, "update", false, "show update progress window")
158155
flag.Parse()
159156
return &flags
160157
}
@@ -323,7 +320,6 @@ type newServiceClientArgs struct {
323320
showDebug bool
324321
showLoginURL bool
325322
showProfiles bool
326-
showUpdate bool
327323
}
328324

329325
// newServiceClient instance constructor
@@ -359,8 +355,6 @@ func newServiceClient(args *newServiceClientArgs) *serviceClient {
359355
s.showDebugUI()
360356
case args.showProfiles:
361357
s.showProfilesUI()
362-
case args.showUpdate:
363-
s.showUpdateProgress(ctx)
364358
}
365359

366360
return s

client/ui/update.go

Lines changed: 0 additions & 127 deletions
This file was deleted.

client/ui/update/progresswindow.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ func (u *UI) ShowUpdateProgress(ctx context.Context) {
4242
u.wUpdateProgress.SetContent(content)
4343
u.wUpdateProgress.CenterOnScreen()
4444
u.wUpdateProgress.SetFixedSize(true)
45-
u.wUpdateProgress.SetCloseIntercept(func() {}) // lock window until result known
45+
u.wUpdateProgress.SetCloseIntercept(func() {
46+
// prevent closing this window until a result
47+
})
4648
u.wUpdateProgress.RequestFocus()
4749
u.wUpdateProgress.Show()
4850

0 commit comments

Comments
 (0)