mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +00:00
32 lines
686 B
Go
32 lines
686 B
Go
//go:build !(linux && 386)
|
|
|
|
package main
|
|
|
|
import _ "embed"
|
|
|
|
//go:embed assets/netbird-systemtray-disconnected.png
|
|
var iconDisconnected []byte
|
|
|
|
//go:embed assets/netbird-systemtray-connected.png
|
|
var iconConnected []byte
|
|
|
|
//go:embed assets/netbird-systemtray-connecting.png
|
|
var iconConnecting []byte
|
|
|
|
//go:embed assets/netbird-systemtray-error.png
|
|
var iconError []byte
|
|
|
|
// iconForStatus returns the appropriate tray icon bytes for the given status string.
|
|
func iconForStatus(status string) []byte {
|
|
switch status {
|
|
case "Connected":
|
|
return iconConnected
|
|
case "Connecting":
|
|
return iconConnecting
|
|
case "Disconnected", "":
|
|
return iconDisconnected
|
|
default:
|
|
return iconError
|
|
}
|
|
}
|