diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-05-17 18:14:28 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-08-04 20:22:14 +0200 |
commit | 82129ba288f7561c89bb80e04841ffb46bc29889 (patch) | |
tree | 6736983a40870c76876a4633fb5ca3b730fbf9da /ui | |
parent | winipcfg: do not set MTU in registry after setting it in iphlpapi (diff) | |
download | wireguard-windows-82129ba288f7561c89bb80e04841ffb46bc29889.tar.xz wireguard-windows-82129ba288f7561c89bb80e04841ffb46bc29889.zip |
ui: show update tab but not alert for limited user
Suggested-by: Diab Neiroukh <lazerl0rd@thezest.dev>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.go | 2 | ||||
-rw-r--r-- | ui/updatepage.go | 6 |
2 files changed, 7 insertions, 1 deletions
@@ -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() { |