const { default: openAboutWindow } = require('about-window'); const { app, BrowserWindow, Menu } = require('electron'); function createWindow() { const win = new BrowserWindow({ width: 800, height: 600, icon: 'public/icon.png', }); win.loadFile('dist/electron-app/browser/index.html'); } app.whenReady().then(() => { createWindow() }) const appMenu = [ { label: 'Fájl', submenu: [ { label: 'Kilép', role: 'quit', accelerator: 'CmdOrCtrl+K' } ] }, { label: 'Súgó', submenu: [ { label: 'Névjegy', click: () => { openAboutWindow({ icon_path: `${process.cwd()}/public/icon.png`, product_name: 'Valami', copyright: 'Copyright (c) 2024, Nagy János', homepage: 'https://szit.hu', description: 'Minta alkalmazás' }) }, accelerator: 'CmdOrCtrl+N' } ] } ] app.on('ready', () => { const menu = Menu.buildFromTemplate(appMenu) Menu.setApplicationMenu(menu) })