File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 dialog ,
66 ipcMain ,
77 net ,
8+ nativeImage ,
89 Notification as ElectronNotification ,
910 protocol ,
1011 shell ,
@@ -156,6 +157,16 @@ function windowIconPath(): string | undefined {
156157 return existsSync ( candidate ) ? candidate : undefined ;
157158}
158159
160+ function applyRuntimeAppIcon ( ) : void {
161+ if ( process . platform !== "darwin" ) return ;
162+ const iconPath = windowIconPath ( ) ;
163+ if ( ! iconPath ) return ;
164+ const icon = nativeImage . createFromPath ( iconPath ) ;
165+ if ( ! icon . isEmpty ( ) ) {
166+ app . dock . setIcon ( icon ) ;
167+ }
168+ }
169+
159170function setDaemonStatus ( nextStatus : DaemonStatus ) : void {
160171 daemonStatus = nextStatus ;
161172 mainWindow ?. webContents . send ( "daemon:status" , daemonStatus ) ;
@@ -952,6 +963,7 @@ app.whenReady().then(async () => {
952963 }
953964
954965 registerRendererProtocol ( ) ;
966+ applyRuntimeAppIcon ( ) ;
955967 createWindow ( ) ;
956968 void startDaemon ( ) ;
957969 initAutoUpdates ( ) ;
You can’t perform that action at this time.
0 commit comments