electron 6 wip

This commit is contained in:
Eugene Pankov 2019-08-27 11:52:52 +02:00
parent 1d8a71fbc0
commit 31ad686545
5 changed files with 28 additions and 29 deletions

View file

@ -124,7 +124,7 @@ export class Application {
{ role: 'services', submenu: [] },
{ type: 'separator' },
{ role: 'hide' },
{ role: 'hideothers' },
{ role: 'hideOthers' },
{ role: 'unhide' },
{ type: 'separator' },
{
@ -145,21 +145,21 @@ export class Application {
{ role: 'cut' },
{ role: 'copy' },
{ role: 'paste' },
{ role: 'pasteandmatchstyle' },
{ role: 'pasteAndMatchStyle' },
{ role: 'delete' },
{ role: 'selectall' },
{ role: 'selectAll' },
],
},
{
label: 'View',
submenu: [
{ role: 'reload' },
{ role: 'forcereload' },
{ role: 'toggledevtools' },
{ role: 'forceReload' },
{ role: 'toggleDevTools' },
{ type: 'separator' },
{ role: 'resetzoom' },
{ role: 'zoomin' },
{ role: 'zoomout' },
{ role: 'resetZoom' },
{ role: 'zoomIn' },
{ role: 'zoomOut' },
{ type: 'separator' },
{ role: 'togglefullscreen' },
],

View file

@ -22,11 +22,11 @@
"@angular/platform-browser-dynamic": "7.2.8",
"@ng-bootstrap/ng-bootstrap": "^4.2.0",
"devtron": "1.4.0",
"fontmanager-redux": "0.3.2",
"electron-config": "2.0.0",
"electron-debug": "^3.0.1",
"electron-is-dev": "1.1.0",
"electron-updater": "^4.0.6",
"fontmanager-redux": "0.3.3",
"js-yaml": "3.13.1",
"keytar": "^4.13.0",
"mz": "^2.7.0",

View file

@ -944,10 +944,10 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"
fontmanager-redux@0.3.2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/fontmanager-redux/-/fontmanager-redux-0.3.2.tgz#e5c8d8dc8fda98629eaef4201a27df9e56a122f4"
integrity sha512-NWmTbYfDijrx8qLJ2+O2VgYKhdfsMy/ec+Qf2DGxoLJDZHaRhBKd2Eufh4fFmfJUAwhzrkIgbKJsNT/IYJDbaA==
fontmanager-redux@0.3.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/fontmanager-redux/-/fontmanager-redux-0.3.3.tgz#39f3493332d1694ef3bd1652ee11d66ae3e4f495"
integrity sha512-n7bz3J+8gHn1+bEsIwdNlZ+wYsof3JPijHW/HQ+0oYA/zVTAuryXYgBrIKboNymJmYnabACoLB0p4tv/vMPGMA==
forever-agent@~0.6.1:
version "0.6.1"

View file

@ -3,21 +3,24 @@ const rebuild = require('electron-rebuild').default
const path = require('path')
const vars = require('./vars')
lifecycles = []
let lifecycles = []
for (let dir of ['app', 'terminus-core', 'terminus-ssh', 'terminus-terminal']) {
build = rebuild({
buildPath: path.resolve(__dirname, '../' + dir),
electronVersion: vars.electronVersion,
force: true,
})
build.catch(() => process.exit(1))
lifecycles.push([build.lifecycle, dir])
const build = rebuild({
buildPath: path.resolve(__dirname, '../' + dir),
electronVersion: vars.electronVersion,
force: true,
})
build.catch(e => {
console.error(e)
process.exit(1)
})
lifecycles.push([build.lifecycle, dir])
}
console.info('Building against Electron', vars.electronVersion)
for (let [lc, dir] of lifecycles) {
lc.on('module-found', name => {
console.info('Rebuilding', dir + '/' + name)
})
lc.on('module-found', name => {
console.info('Rebuilding', dir + '/' + name)
})
}

View file

@ -56,10 +56,6 @@ export class ElectronService {
browserWindow: Electron.BrowserWindow,
options: Electron.MessageBoxOptions
): Promise<MessageBoxResponse> {
return new Promise(resolve => {
this.dialog.showMessageBox(browserWindow, options, (response, checkboxChecked) => {
resolve({ response, checkboxChecked })
})
})
return this.dialog.showMessageBox(browserWindow, options)
}
}