-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
41 lines (31 loc) · 808 Bytes
/
main.js
File metadata and controls
41 lines (31 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
'use strict';
var app = require('app');
var BrowserWindow = require('browser-window');
require('crash-reporter').start();
var mainWindow = null;
var windowConfig = {
width: 300,
height: 60,
frame: false,
resizable: false,
"always-on-top": true
}
app.on('window-all-closed', function() {
if (process.platform != 'darwin')
app.quit();
});
app.on('ready', function() {
mainWindow = new BrowserWindow(windowConfig);
if (process.env.HOT) {
mainWindow.loadUrl('file://' + __dirname + '/app/hot-dev-app.html');
} else {
mainWindow.loadUrl('file://' + __dirname + '/app/app.html');
}
mainWindow.on('closed', function() {
mainWindow = null;
});
if (process.env.NODE_ENV === 'development') {
mainWindow.openDevTools();
mainWindow.setResizable(true);
}
});