1
1
"use strict" ;
2
2
/* global __static */
3
- import { app , BrowserWindow , screen , Menu } from "electron" ;
3
+ import { BrowserWindow , screen } from "electron" ;
4
4
import path from "path" ;
5
5
import ensurePlodoProtocol from "./windowHelper" ;
6
+ import logging from "../common/Logging" ;
6
7
import tray from "./Tray" ;
7
8
8
9
const DEBUG = process . env . NODE_ENV !== "production" ;
9
10
let win ;
10
11
const isMac = process . platform === "darwin" ;
11
12
12
-
13
13
/**
14
14
* @param {String } route
15
15
*/
@@ -41,7 +41,6 @@ const showWindow = () => {
41
41
}
42
42
} ;
43
43
44
-
45
44
/**
46
45
* @param {BrowserWindow } win
47
46
* @returns {{x:Number, y:Number} }
@@ -100,7 +99,7 @@ const createWindow = (hideOnBlur = false, hideOnClose = true) => {
100
99
} ) ;
101
100
} ;
102
101
103
- const navigate = ( window , route ) => {
102
+ const navigate = ( window , route = "" ) => {
104
103
if ( process . env . WEBPACK_DEV_SERVER_URL ) {
105
104
// Load the url of the dev server if in development mode
106
105
window . loadURL ( `${ process . env . WEBPACK_DEV_SERVER_URL } ${ route } ` ) ;
@@ -111,6 +110,8 @@ const navigate = (window, route) => {
111
110
}
112
111
} ;
113
112
114
- const destroy = ( ) => { if ( win ) win . destroy ( ) ; } ;
113
+ const destroy = ( ) => {
114
+ if ( win ) win . destroy ( ) ;
115
+ } ;
115
116
116
117
export default { openAndNavigate, toggleWindow, getWindow, destroy } ;
0 commit comments