2016-03-24 20:15:04 +00:00
|
|
|
const electron = require('electron')
|
|
|
|
const app = electron.app
|
|
|
|
const BrowserWindow = electron.BrowserWindow
|
2013-07-17 08:21:33 +00:00
|
|
|
|
2016-03-24 20:15:04 +00:00
|
|
|
var mainWindow = null
|
2013-07-17 08:21:33 +00:00
|
|
|
|
|
|
|
// Quit when all windows are closed.
|
2016-03-24 20:15:04 +00:00
|
|
|
app.on('window-all-closed', function () {
|
|
|
|
app.quit()
|
|
|
|
})
|
2013-07-17 08:21:33 +00:00
|
|
|
|
2016-03-24 20:15:04 +00:00
|
|
|
exports.load = function (appUrl) {
|
|
|
|
app.on('ready', function () {
|
2016-02-04 18:26:11 +00:00
|
|
|
mainWindow = new BrowserWindow({
|
|
|
|
width: 800,
|
|
|
|
height: 600,
|
|
|
|
autoHideMenuBar: true,
|
2016-03-27 17:38:32 +00:00
|
|
|
useContentSize: true
|
2016-03-24 20:15:04 +00:00
|
|
|
})
|
|
|
|
mainWindow.loadURL(appUrl)
|
|
|
|
mainWindow.focus()
|
|
|
|
})
|
|
|
|
}
|