chore: Update npm dependencies and add @electron-forge/maker-dmg package
This commit is contained in:
@ -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",
|
||||
|
BIN
electron-3d-app/src/favicon.ico
Normal file
BIN
electron-3d-app/src/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
@ -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) {
|
||||
|
Reference in New Issue
Block a user