Files
Devon Bontrager 34cefb0087 Initial commit — FreightCalculatorPro Electron app
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 13:36:45 -04:00

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();
}
});