2015-11-12 10:28:04 +00:00
|
|
|
const electron = require('electron');
|
|
|
|
const app = electron.app;
|
|
|
|
const BrowserWindow = electron.BrowserWindow;
|
2013-07-17 08:21:33 +00:00
|
|
|
|
|
|
|
var mainWindow = null;
|
|
|
|
|
|
|
|
// Quit when all windows are closed.
|
|
|
|
app.on('window-all-closed', function() {
|
2014-04-10 07:08:14 +00:00
|
|
|
app.quit();
|
2013-07-17 08:21:33 +00:00
|
|
|
});
|
|
|
|
|
2016-02-04 18:26:11 +00:00
|
|
|
exports.load = function(appUrl) {
|
|
|
|
app.on('ready', function() {
|
|
|
|
mainWindow = new BrowserWindow({
|
|
|
|
width: 800,
|
|
|
|
height: 600,
|
|
|
|
autoHideMenuBar: true,
|
|
|
|
useContentSize: true,
|
|
|
|
});
|
|
|
|
mainWindow.loadURL(appUrl);
|
|
|
|
mainWindow.focus();
|
2014-05-15 07:29:53 +00:00
|
|
|
});
|
2016-02-04 18:26:11 +00:00
|
|
|
};
|