It all works....

This commit is contained in:
Daniel Ledda
2021-07-03 20:00:13 +02:00
parent c8f37d0d98
commit c950631b5e
45 changed files with 10537 additions and 903 deletions

30
src/desktop/main.js Normal file
View File

@@ -0,0 +1,30 @@
const { app, BrowserWindow } = require('electron');
const path = require('path');
function createWindow() {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
}
});
win.loadFile(path.join(__dirname, '../../public/index.html'));
}
app.whenReady().then(() => {
createWindow();
app.on('activate', function() {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
})
});
app.on('window-all-close', function() {
if (process.platform !== 'darwin') {
app.quit();
}
});