diff options
Diffstat (limited to '')
-rw-r--r-- | manager/ipc_server.go | 5 | ||||
-rw-r--r-- | ui/ui.go | 2 | ||||
-rw-r--r-- | ui/updatepage.go | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/manager/ipc_server.go b/manager/ipc_server.go index b9b1eb8c..fe195094 100644 --- a/manager/ipc_server.go +++ b/manager/ipc_server.go @@ -290,9 +290,6 @@ func (s *ManagerService) Quit(stopTunnelsOnQuit bool) (alreadyQuit bool, err err } func (s *ManagerService) UpdateState() UpdateState { - if s.elevatedToken == 0 { - return UpdateStateUnknown - } return updateState } @@ -551,7 +548,7 @@ func IPCServerNotifyTunnelsChange() { } func IPCServerNotifyUpdateFound(state UpdateState) { - notifyAll(UpdateFoundNotificationType, true, state) + notifyAll(UpdateFoundNotificationType, false, state) } func IPCServerNotifyUpdateProgress(dp updater.DownloadProgress) { @@ -73,7 +73,7 @@ func RunUI() { switch updateState { case manager.UpdateStateFoundUpdate: mtw.UpdateFound() - if tray != nil { + if tray != nil && IsAdmin { tray.UpdateFound() } case manager.UpdateStateUpdatesDisabledUnofficialBuild: diff --git a/ui/updatepage.go b/ui/updatepage.go index cb76da6f..96fc87f3 100644 --- a/ui/updatepage.go +++ b/ui/updatepage.go @@ -64,6 +64,12 @@ func NewUpdatePage() (*UpdatePage, error) { button.SetImage(updateIcon) button.SetText(l18n.Sprintf("Update Now")) + if !IsAdmin { + button.SetText(l18n.Sprintf("Please ask the system administrator to update.")) + button.SetEnabled(false) + status.SetText(l18n.Sprintf("Status: Waiting for administrator")) + } + walk.NewVSpacer(up) switchToUpdatingState := func() { |