mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2025-01-09 06:01:57 -05:00
commit
4b462212a8
3 changed files with 529 additions and 281 deletions
797
package-lock.json
generated
797
package-lock.json
generated
File diff suppressed because it is too large
Load diff
10
package.json
10
package.json
|
@ -39,11 +39,11 @@
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"babel-plugin-react-intl": "^7.5.7",
|
"babel-plugin-react-intl": "^7.5.7",
|
||||||
"copy-webpack-plugin": "^5.1.1",
|
"copy-webpack-plugin": "^5.1.1",
|
||||||
"electron": "^8.2.5",
|
"electron": "^15.3.1",
|
||||||
"electron-builder": "^22.11.5",
|
"electron-builder": "^22.13.1",
|
||||||
"electron-devtools-installer": "^3.0.0",
|
"electron-devtools-installer": "^3.2.0",
|
||||||
"electron-notarize": "^0.3.0",
|
"electron-notarize": "^1.1.1",
|
||||||
"electron-store": "^5.1.1",
|
"electron-store": "^8.0.1",
|
||||||
"electron-webpack": "^2.8.2",
|
"electron-webpack": "^2.8.2",
|
||||||
"eslint": "^7.0.0",
|
"eslint": "^7.0.0",
|
||||||
"eslint-config-scratch": "^6.0.0",
|
"eslint-config-scratch": "^6.0.0",
|
||||||
|
|
|
@ -171,6 +171,7 @@ const createWindow = ({search = null, url = 'index.html', ...browserWindowOption
|
||||||
useContentSize: true,
|
useContentSize: true,
|
||||||
show: false,
|
show: false,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
contextIsolation: false,
|
||||||
nodeIntegration: true
|
nodeIntegration: true
|
||||||
},
|
},
|
||||||
...browserWindowOptions
|
...browserWindowOptions
|
||||||
|
@ -291,6 +292,7 @@ const createMainWindow = () => {
|
||||||
// don't clean up until after the message box to allow troubleshooting / recovery
|
// don't clean up until after the message box to allow troubleshooting / recovery
|
||||||
await dialog.showMessageBox(window, {
|
await dialog.showMessageBox(window, {
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
title: 'Failed to save project',
|
||||||
message: `Save failed:\n${userChosenPath}`,
|
message: `Save failed:\n${userChosenPath}`,
|
||||||
detail: e.message
|
detail: e.message
|
||||||
});
|
});
|
||||||
|
@ -311,6 +313,7 @@ const createMainWindow = () => {
|
||||||
|
|
||||||
webContents.on('will-prevent-unload', ev => {
|
webContents.on('will-prevent-unload', ev => {
|
||||||
const choice = dialog.showMessageBoxSync(window, {
|
const choice = dialog.showMessageBoxSync(window, {
|
||||||
|
title: productName,
|
||||||
type: 'question',
|
type: 'question',
|
||||||
message: 'Leave Scratch?',
|
message: 'Leave Scratch?',
|
||||||
detail: 'Any unsaved changes will be lost.',
|
detail: 'Any unsaved changes will be lost.',
|
||||||
|
|
Loading…
Reference in a new issue