expose combined context menu in tab header and add visual context menu button - fixes #6966

This commit is contained in:
Eugene Pankov
2022-09-05 00:24:21 +02:00
parent 3226a3d70f
commit fbea7db188
8 changed files with 89 additions and 45 deletions

View File

@@ -48,6 +48,14 @@ export class MiscContextMenu extends TabContextMenuItemProvider {
constructor (private translate: TranslateService) { super() }
async getItems (tab: BaseTabComponent): Promise<MenuItemOptions[]> {
if (tab instanceof BaseTerminalTabComponent && tab.enableToolbar && !tab.pinToolbar) {
return [{
label: this.translate.instant('Show toolbar'),
click: () => {
tab.pinToolbar = true
},
}]
}
if (tab instanceof BaseTerminalTabComponent && tab.session?.supportsWorkingDirectory()) {
return [{
label: this.translate.instant('Copy current path'),