-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.js
45 lines (35 loc) · 952 Bytes
/
main.js
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
42
43
44
45
/* Requires */
var app = require('app');
var config = require('./config.json');
var BrowserWindow = require('browser-window');
require('crash-reporter').start();
/* Variables */
var mainWindow = null;
/* Callbacks */
app.on('window-all-closed', function() {
if (process.platform != 'darwin')
app.quit();
});
app.on('ready', function() {
mainWindow = new BrowserWindow({
show: false,
width: 1400,
height: 658,
center: true,
frame: false,
transparent: true,
resizeable: false,
icon: 'public/img/logo.png'
});
mainWindow.loadUrl('file://' + __dirname + '/index.html');
mainWindow.webContents.on('did-finish-load', function() {
if(config.debug) {
mainWindow.openDevTools();
}
mainWindow.show();
mainWindow.focus();
});
mainWindow.on('closed', function() {
mainWindow = null;
});
});