(tokens, params, filters)
| 3443 | label: 'Debug Console', |
| 3444 | click: () => mainWindow.webContents.openDevTools() |
| 3445 | } |
| 3446 | ] |
| 3447 | } |
| 3448 | ]; |
| 3449 | |
| 3450 | const menu = Menu.buildFromTemplate(template); |
| 3451 | Menu.setApplicationMenu(menu); |
| 3452 | |
| 3453 | // Register before loadURL — localhost static server can finish before await returns, |
| 3454 | // so attaching ready-to-show after loadURL misses the event and the window stays hidden. |
| 3455 | let mainWindowShown = false; |
| 3456 | let forceShowTimer = null; |
| 3457 | const showMainWindowWhenReady = () => { |
| 3458 | if (mainWindowShown || !mainWindow || mainWindow.isDestroyed()) return; |
| 3459 | mainWindowShown = true; |
no test coverage detected