@@ -4,17 +4,17 @@ import path from "path";
4
4
import packageJson from "../../../package.json" ;
5
5
import { Settings } from "../../types/settings" ;
6
6
import {
7
- checkIdle ,
8
- checkInWorkingHours ,
9
- createBreak ,
10
- getBreakTime ,
11
- startBreakNow ,
7
+ checkIdle ,
8
+ checkInWorkingHours ,
9
+ createBreak ,
10
+ getBreakTime ,
11
+ startBreakNow
12
12
} from "./breaks" ;
13
13
import {
14
- getDisableEndTime ,
15
- getSettings ,
16
- setDisableEndTime ,
17
- setSettings ,
14
+ getDisableEndTime ,
15
+ getSettings ,
16
+ setDisableEndTime ,
17
+ setSettings
18
18
} from "./store" ;
19
19
import { createSettingsWindow } from "./windows" ;
20
20
@@ -59,22 +59,22 @@ function getDisableTimeRemaining(): string {
59
59
}
60
60
61
61
export function buildTray ( ) : void {
62
- if ( ! tray ) {
63
- let imgPath ;
64
-
65
- if ( process . platform === "darwin" ) {
66
- imgPath =
67
- process . env . NODE_ENV === "development"
68
- ? "resources/tray/tray-IconTemplate.png"
69
- : path . join ( resourcesPath , "tray" , "tray-IconTemplate.png" ) ;
70
- } else {
71
- imgPath =
72
- process . env . NODE_ENV === "development"
73
- ? "resources/tray/icon.png"
74
- : path . join ( resourcesPath , "tray" , "icon.png" ) ;
75
- }
76
-
77
- tray = new Tray ( imgPath ) ;
62
+ if ( ! tray ) {
63
+ let imgPath ;
64
+
65
+ if ( process . platform === "darwin" ) {
66
+ imgPath =
67
+ process . env . NODE_ENV === "development"
68
+ ? "resources/tray/tray-IconTemplate.png"
69
+ : path . join ( resourcesPath , "tray" , "tray-IconTemplate.png" ) ;
70
+ } else {
71
+ imgPath =
72
+ process . env . NODE_ENV === "development"
73
+ ? "resources/tray/icon.png"
74
+ : path . join ( app . getAppPath ( ) , ".." , "tray" , "icon.png" ) ;
75
+ }
76
+
77
+ tray = new Tray ( imgPath ) ;
78
78
79
79
// On windows, context menu will not show on left click by default
80
80
if ( process . platform === "win32" ) {
0 commit comments