From 3d841eb97ca3fb470549d02cc47cefa52bdf83eb Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 15 Apr 2022 19:52:07 +0200 Subject: [PATCH] added "new window" to macOS dock menu - fixes #6037 --- tabby-local/src/services/dockMenu.service.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tabby-local/src/services/dockMenu.service.ts b/tabby-local/src/services/dockMenu.service.ts index b33daa99..25c376a5 100644 --- a/tabby-local/src/services/dockMenu.service.ts +++ b/tabby-local/src/services/dockMenu.service.ts @@ -51,12 +51,18 @@ export class DockMenuService { } if (this.hostApp.platform === Platform.macOS) { this.electron.app.dock.setMenu(this.electron.Menu.buildFromTemplate( - [...this.profilesService.getRecentProfiles(), ...profiles].map(profile => ({ - label: profile.name, - click: () => this.zone.run(async () => { - this.profilesService.openNewTabForProfile(profile) - }), - })), + [ + ...[...this.profilesService.getRecentProfiles(), ...profiles].map(profile => ({ + label: profile.name, + click: () => this.zone.run(async () => { + this.profilesService.openNewTabForProfile(profile) + }), + })), + { + label: this.translate.instant('New Window'), + click: () => this.zone.run(() => this.hostApp.newWindow()), + }, + ], )) } }