34cefb0087
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
34 lines
788 B
JavaScript
34 lines
788 B
JavaScript
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();
|
|
}
|
|
}); |