diff --git a/client/ui/build/darwin/Assets.car b/client/ui/build/darwin/Assets.car index c8039fa6b..fde595889 100644 Binary files a/client/ui/build/darwin/Assets.car and b/client/ui/build/darwin/Assets.car differ diff --git a/client/ui/build/darwin/Taskfile.yml b/client/ui/build/darwin/Taskfile.yml index e4a2d03a9..19ca31b1d 100644 --- a/client/ui/build/darwin/Taskfile.yml +++ b/client/ui/build/darwin/Taskfile.yml @@ -163,6 +163,8 @@ tasks: - 'echo "Skipping codesign (not available on {{OS}}). Sign the .app on macOS before distribution."' run: + deps: + - task: common:generate:icons cmds: - mkdir -p "{{.BIN_DIR}}/{{.APP_NAME}}.dev.app/Contents/MacOS" - mkdir -p "{{.BIN_DIR}}/{{.APP_NAME}}.dev.app/Contents/Resources" diff --git a/client/ui/frontend/index.html b/client/ui/frontend/index.html index 2efe3d5ca..93aa1039b 100644 --- a/client/ui/frontend/index.html +++ b/client/ui/frontend/index.html @@ -7,6 +7,6 @@
- + diff --git a/client/ui/frontend/src/app-new.tsx b/client/ui/frontend/src/app.tsx similarity index 100% rename from client/ui/frontend/src/app-new.tsx rename to client/ui/frontend/src/app.tsx diff --git a/client/ui/main.go b/client/ui/main.go index 074a380c7..21d53dd9c 100644 --- a/client/ui/main.go +++ b/client/ui/main.go @@ -7,6 +7,7 @@ import ( "embed" "flag" "log" + "runtime" "strings" "github.com/wailsapp/wails/v3/pkg/application" @@ -66,6 +67,15 @@ func main() { // declared before app.New so the closure has a stable reference. var tray *Tray + // On macOS, application.Options.Icon is fed into NSApplication's + // setApplicationIconImage at startup, which would override the bundle + // icon (Assets.car / icons.icns) the OS already picked. We want the + // bundle's squircle to stay, so suppress it on darwin. + appIcon := iconWindow + if runtime.GOOS == "darwin" { + appIcon = nil + } + app := application.New(application.Options{ // Windows uses Name as the AppUserModelID for toast notifications // (see notifications_windows.go: cfg.Name -> wn.appName -> AppID) @@ -77,7 +87,7 @@ func main() { // CustomActivator registry value is orphaned. Name: "NetBird", Description: "NetBird desktop client", - Icon: iconWindow, + Icon: appIcon, Assets: application.AssetOptions{ Handler: application.AssetFileServerFS(assets), },