update to electron 2.x

This commit is contained in:
Kyle Spearrin 2018-05-31 08:09:56 -04:00
parent e0190f14be
commit 98e2e611f8
3 changed files with 11 additions and 11 deletions

14
package-lock.json generated
View File

@ -1885,20 +1885,20 @@
"dev": true "dev": true
}, },
"electron": { "electron": {
"version": "1.8.4", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/electron/-/electron-1.8.4.tgz", "resolved": "https://registry.npmjs.org/electron/-/electron-2.0.2.tgz",
"integrity": "sha512-2f1cx0G3riMFODXFftF5AHXy+oHfhpntZHTDN66Hxtl09gmEr42B3piNEod9MEmw72f75LX2JfeYceqq1PF8cA==", "integrity": "sha512-XmkGVoHLOqmjZ2nU/0zEzMl3TZEz452Q1fTJFKjylg4pLYaq7na7V2uxzydVQNQukZGbERoA7ayjxXzTsXbtdA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/node": "8.10.9", "@types/node": "8.10.17",
"electron-download": "3.3.0", "electron-download": "3.3.0",
"extract-zip": "1.6.6" "extract-zip": "1.6.6"
}, },
"dependencies": { "dependencies": {
"@types/node": { "@types/node": {
"version": "8.10.9", "version": "8.10.17",
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.9.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.17.tgz",
"integrity": "sha512-GUUTbeDaJSRaoLkqVQ5jwwKbDiLWFX3JrKLvC078q2P51Z9Dcb5F5UdnApSYqdMk4X0VrKod1gzeoX8bGl8DMg==", "integrity": "sha512-3N3FRd/rA1v5glXjb90YdYUa+sOB7WrkU2rAhKZnF4TKD86Cym9swtulGuH0p9nxo7fP5woRNa8b0oFTpCO1bg==",
"dev": true "dev": true
} }
} }

View File

@ -34,7 +34,7 @@
"@types/papaparse": "4.1.31", "@types/papaparse": "4.1.31",
"@types/webcrypto": "0.0.28", "@types/webcrypto": "0.0.28",
"concurrently": "3.5.1", "concurrently": "3.5.1",
"electron": "1.8.4", "electron": "2.0.2",
"jasmine": "^3.1.0", "jasmine": "^3.1.0",
"jasmine-core": "^2.8.0", "jasmine-core": "^2.8.0",
"jasmine-spec-reporter": "^4.2.1", "jasmine-spec-reporter": "^4.2.1",

View File

@ -217,11 +217,11 @@ export class BaseMenu {
this.windowMain.win.webContents.on('context-menu', (e, props) => { this.windowMain.win.webContents.on('context-menu', (e, props) => {
const selected = props.selectionText && props.selectionText.trim() !== ''; const selected = props.selectionText && props.selectionText.trim() !== '';
if (props.isEditable && selected) { if (props.isEditable && selected) {
inputSelectionMenu.popup(this.windowMain.win); inputSelectionMenu.popup({ window: this.windowMain.win });
} else if (props.isEditable) { } else if (props.isEditable) {
inputMenu.popup(this.windowMain.win); inputMenu.popup({ window: this.windowMain.win });
} else if (selected) { } else if (selected) {
selectionMenu.popup(this.windowMain.win); selectionMenu.popup({ window: this.windowMain.win });
} }
}); });
} }