feat: tab context menu 'Restart'

This commit is contained in:
Qiming-Liu 2022-07-02 17:19:43 +09:30 committed by Eugene
parent 8be6f852fb
commit aa5970b12d

View File

@ -120,6 +120,17 @@ export class CommonOptionsContextMenu extends TabContextMenuItemProvider {
label: this.translate.instant('Duplicate'), label: this.translate.instant('Duplicate'),
click: () => this.app.duplicateTab(tab), click: () => this.app.duplicateTab(tab),
}, },
{
label: this.translate.instant('Restart'),
click: () => {
this.app.duplicateTab(tab)
if (this.app.tabs.includes(tab)) {
this.app.closeTab(tab, true)
} else {
tab.destroy()
}
},
},
{ {
label: this.translate.instant('Color'), label: this.translate.instant('Color'),
sublabel: currentColor ? this.translate.instant(currentColor) : undefined, sublabel: currentColor ? this.translate.instant(currentColor) : undefined,