Browse Source

added "new window" to macOS dock menu - fixes #6037

Eugene Pankov 3 years ago
parent
commit
3d841eb97c
1 changed files with 12 additions and 6 deletions
  1. 12 6
      tabby-local/src/services/dockMenu.service.ts

+ 12 - 6
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()),
+                    },
+                ],
             ))
         }
     }