chore: Update npm dependencies and add @electron-forge/maker-dmg package

This commit is contained in:
2024-07-02 11:09:17 +02:00
parent 1d917a6d50
commit 8857ce9c5b
3 changed files with 10 additions and 2 deletions

View File

@ -17,6 +17,7 @@
"@electron-forge/maker-rpm": "^7.4.0",
"@electron-forge/maker-squirrel": "^7.4.0",
"@electron-forge/maker-zip": "^7.4.0",
"@electron-forge/maker-dmg": "^7.4.0",
"@electron-forge/plugin-auto-unpack-natives": "^7.4.0",
"@electron-forge/plugin-fuses": "^7.4.0",
"@electron/fuses": "^1.8.0",
@ -29,7 +30,6 @@
},
"license": "MIT",
"dependencies": {
"@electron-forge/maker-dmg": "^7.4.0",
"custom-electron-prompt": "^1.5.7",
"electron-squirrel-startup": "^1.0.1",
"jspython-interpreter": "^2.1.15",

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -26,7 +26,8 @@ const createWindow = () => {
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
},
nodeIntegration: true
nodeIntegration: true,
icon: path.join(__dirname, 'favicon.ico'),
});
mainWindow.setMenu(null);
@ -72,6 +73,13 @@ const createWindow = () => {
menu.popup();
});
mainWindow.webContents.on('will-navigate', (details, url, isInPlace, isMainFrame, frameProcessId, frameRoutingId) => {
if (!url.startsWith(config.serverUrl)) {
details.preventDefault();
shell.openExternal(url);
}
})
ipcMain.on("config-change", (event) => {
prompt({ title: "Configuration", label: "Please provide the server URL and port:", inputAttrs: { type: 'url' }, type: "input", value: config.serverUrl }).then((value) => {
if (value !== null) {