Merge pull request #211 from LLK/electron-15

Update to Electron 15
This commit is contained in:
Christopher Willis-Ford 2021-11-10 10:38:17 -08:00 committed by GitHub
commit 4b462212a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 529 additions and 281 deletions

797
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -39,11 +39,11 @@
"babel-loader": "^8.1.0",
"babel-plugin-react-intl": "^7.5.7",
"copy-webpack-plugin": "^5.1.1",
"electron": "^8.2.5",
"electron-builder": "^22.11.5",
"electron-devtools-installer": "^3.0.0",
"electron-notarize": "^0.3.0",
"electron-store": "^5.1.1",
"electron": "^15.3.1",
"electron-builder": "^22.13.1",
"electron-devtools-installer": "^3.2.0",
"electron-notarize": "^1.1.1",
"electron-store": "^8.0.1",
"electron-webpack": "^2.8.2",
"eslint": "^7.0.0",
"eslint-config-scratch": "^6.0.0",

View file

@ -171,6 +171,7 @@ const createWindow = ({search = null, url = 'index.html', ...browserWindowOption
useContentSize: true,
show: false,
webPreferences: {
contextIsolation: false,
nodeIntegration: true
},
...browserWindowOptions
@ -291,6 +292,7 @@ const createMainWindow = () => {
// don't clean up until after the message box to allow troubleshooting / recovery
await dialog.showMessageBox(window, {
type: 'error',
title: 'Failed to save project',
message: `Save failed:\n${userChosenPath}`,
detail: e.message
});
@ -311,6 +313,7 @@ const createMainWindow = () => {
webContents.on('will-prevent-unload', ev => {
const choice = dialog.showMessageBoxSync(window, {
title: productName,
type: 'question',
message: 'Leave Scratch?',
detail: 'Any unsaved changes will be lost.',