mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-05 22:44:55 +00:00
expose combined context menu in tab header and add visual context menu button - fixes #6966
This commit is contained in:
@@ -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'),
|
||||
|
Reference in New Issue
Block a user