const { app, BrowserWindow } = require('electron'); const path = require('path'); function createWindow () { const win = new BrowserWindow({ width: 950, height: 950, resizable: true, minWidth: 800, minHeight: 700, icon: path.join(__dirname, 'icon.png'), // Window icon autoHideMenuBar: true, // Hides the top menu bar for a cleaner look webPreferences: { nodeIntegration: true, // Allows the HTML to use Node features if needed contextIsolation: false } }); win.loadFile('index.html'); } app.whenReady().then(createWindow); app.on('window-all-closed', () => { if (process.platform !== 'darwin') { app.quit(); } }); app.on('activate', () => { if (BrowserWindow.getAllWindows().length === 0) { createWindow(); } });