1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-11-22 11:52:03 +03:00

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

This commit is contained in:
Eugene Pankov 2022-04-15 19:52:07 +02:00
parent 7016688170
commit 3d841eb97c
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -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 => ({
[
...[...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()),
},
],
))
}
}