proper macOS menu (fixes #39)

This commit is contained in:
Eugene Pankov
2017-07-05 19:05:45 +02:00
parent deb4b963cd
commit f4eb03fee0
3 changed files with 83 additions and 23 deletions

View File

@@ -19,6 +19,7 @@ export class HostAppService {
platform: Platform
nodePlatform: string
quitRequested = new EventEmitter<any>()
preferencesMenu$ = new Subject<void>()
ready = new EventEmitter<any>()
shown = new EventEmitter<any>()
secondInstance$ = new Subject<{ argv: string[], cwd: string }>()
@@ -39,6 +40,7 @@ export class HostAppService {
}[this.nodePlatform]
electron.ipcRenderer.on('host:quit-request', () => this.zone.run(() => this.quitRequested.emit()))
electron.ipcRenderer.on('host:preferences-menu', () => this.zone.run(() => this.preferencesMenu$.next()))
electron.ipcRenderer.on('uncaughtException', ($event, err) => {
this.logger.error('Unhandled exception:', err)