aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/tray.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/tray.go b/ui/tray.go
index 4a11984a..3fed2114 100644
--- a/ui/tray.go
+++ b/ui/tray.go
@@ -255,6 +255,8 @@ func (tray *Tray) SetTunnelState(tunnel *service.Tunnel, state service.TunnelSta
wasChecked := tunnelAction.Checked()
+ icon, _ := iconProvider.IconWithOverlayForState(state)
+
switch state {
case service.TunnelStarted:
activeCIDRsAction.SetText("")
@@ -277,13 +279,13 @@ func (tray *Tray) SetTunnelState(tunnel *service.Tunnel, state service.TunnelSta
tunnelAction.SetEnabled(true)
tunnelAction.SetChecked(true)
if !wasChecked && showNotifications {
- tray.ShowInfo("WireGuard Activated", fmt.Sprintf("The %s tunnel has been activated.", tunnel.Name))
+ tray.ShowCustom("WireGuard Activated", fmt.Sprintf("The %s tunnel has been activated.", tunnel.Name), icon)
}
case service.TunnelStopped:
tunnelAction.SetChecked(false)
if wasChecked && showNotifications {
- tray.ShowInfo("WireGuard Deactivated", fmt.Sprintf("The %s tunnel has been deactivated.", tunnel.Name))
+ tray.ShowCustom("WireGuard Deactivated", fmt.Sprintf("The %s tunnel has been deactivated.", tunnel.Name), icon)
}
}
}