2018-07-11 21:10:42 -04:00
|
|
|
const {app, BrowserWindow, Menu, nativeImage} = require('electron');
|
2018-07-10 18:27:18 -04:00
|
|
|
const path = require('path');
|
|
|
|
const url = require('url');
|
|
|
|
|
|
|
|
let win;
|
|
|
|
|
|
|
|
function createWindow() {
|
2018-07-11 21:10:42 -04:00
|
|
|
let image = nativeImage.createFromPath('assets/img/logo.png');
|
|
|
|
|
|
|
|
win = new BrowserWindow({
|
|
|
|
width: 1000,
|
|
|
|
height: 800,
|
|
|
|
icon: image,
|
|
|
|
title: 'Formula Manager 2.0'
|
|
|
|
});
|
2018-07-10 18:27:18 -04:00
|
|
|
|
|
|
|
Menu.setApplicationMenu(null);
|
|
|
|
|
|
|
|
// load the dist folder from Angular
|
2018-07-11 21:10:42 -04:00
|
|
|
win.loadURL('https://fhsons.zakscode.com/formulaManager');
|
2018-07-10 18:27:18 -04:00
|
|
|
|
|
|
|
// Open the DevTools optionally:
|
|
|
|
win.webContents.openDevTools();
|
|
|
|
|
|
|
|
win.on('closed', () => (win = null));
|
|
|
|
}
|
|
|
|
|
|
|
|
app.on('ready', createWindow);
|
|
|
|
|
|
|
|
app.on('window-all-closed', () => {
|
|
|
|
if (process.platform !== 'darwin') {
|
|
|
|
app.quit();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
app.on('activate', () => {
|
|
|
|
if (win === null) {
|
|
|
|
createWindow();
|
|
|
|
}
|
|
|
|
});
|