11import { app , globalShortcut , ipcMain as ipc , nativeTheme } from 'electron' ;
22import log from 'electron-log' ;
33import { menubar } from 'menubar' ;
4+
45import { onFirstRunMaybe } from './first-run' ;
5- import {
6- activeIcon ,
7- activeUpdateIcon ,
8- idleAlternateIcon ,
9- idleAlternateUpdateIcon ,
10- idleIcon ,
11- idleUpdateIcon ,
12- } from './icons' ;
6+ import { TrayIcons } from './icons' ;
137import MenuBuilder from './menu' ;
148import Updater from './updater' ;
159
@@ -30,7 +24,7 @@ const browserWindowOpts = {
3024} ;
3125
3226const mb = menubar ( {
33- icon : idleIcon ,
27+ icon : TrayIcons . idle ,
3428 index : `file://${ __dirname } /index.html` ,
3529 browserWindow : browserWindowOpts ,
3630 preloadWindow : true ,
@@ -115,8 +109,8 @@ app.whenReady().then(async () => {
115109 if ( ! mb . tray . isDestroyed ( ) ) {
116110 mb . tray . setImage (
117111 menuBuilder . isUpdateAvailableMenuVisible ( )
118- ? activeUpdateIcon
119- : activeIcon ,
112+ ? TrayIcons . activeUpdateIcon
113+ : TrayIcons . active ,
120114 ) ;
121115 }
122116 } ) ;
@@ -126,14 +120,14 @@ app.whenReady().then(async () => {
126120 if ( shouldUseAlternateIdleIcon ) {
127121 mb . tray . setImage (
128122 menuBuilder . isUpdateAvailableMenuVisible ( )
129- ? idleAlternateUpdateIcon
130- : idleAlternateIcon ,
123+ ? TrayIcons . idleAlternateUpdateIcon
124+ : TrayIcons . idleAlternate ,
131125 ) ;
132126 } else {
133127 mb . tray . setImage (
134128 menuBuilder . isUpdateAvailableMenuVisible ( )
135- ? idleUpdateIcon
136- : idleIcon ,
129+ ? TrayIcons . idleUpdateIcon
130+ : TrayIcons . idle ,
137131 ) ;
138132 }
139133 }
0 commit comments