24 lines
523 B
JavaScript
24 lines
523 B
JavaScript
const { app, BrowserWindow } = require('electron');
|
|
|
|
app.whenReady().then(() => {
|
|
createWindow();
|
|
|
|
app.on('activate', () => {
|
|
if (BrowserWindow.getAllWindows().length === 0) createWindow();
|
|
});
|
|
});
|
|
|
|
app.on('window-all-closed', () => {
|
|
if (process.platform !== 'darwin') app.quit();
|
|
});
|
|
|
|
function createWindow() {
|
|
const win = new BrowserWindow({
|
|
width: 280,
|
|
height: 485,
|
|
// resizable: false,
|
|
autoHideMenuBar: true,
|
|
});
|
|
|
|
win.loadFile('static/index.html');
|
|
} |