This commit is contained in:
JISAUAY committed 2024-10-17 17:00:38 -05:00
commit e0fcf3326e
7 files changed
+89

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
const { app, BrowserWindow } = require('electron');
// const { initialize, enable } = require('@electron/remote/main');
const path = require('node:path');
// initialize();
const createWindow = () => {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
preload: path.join(__dirname, 'preload.js')
}
});
win.loadFile('src/index.html');
// enable(win.webContents);
};
app.whenReady().then(() => {
createWindow();
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0)
createWindow();
});
});
app.on('window-all-closed', () => {
if (process.platform !== 'darwin')
app.quit();
});