mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-22 11:52:03 +03:00
This commit is contained in:
parent
1397d0faed
commit
62d2735f86
@ -21,15 +21,21 @@ export class EditSFTPContextMenu extends SFTPContextMenuItemProvider {
|
||||
}
|
||||
|
||||
async getItems (item: SFTPFile, panel: SFTPPanelComponent): Promise<MenuItemOptions[]> {
|
||||
if (item.isDirectory) {
|
||||
return []
|
||||
}
|
||||
return [
|
||||
const items: MenuItemOptions[] = [
|
||||
{
|
||||
click: () => this.edit(item, panel.sftp),
|
||||
label: this.translate.instant('Edit locally'),
|
||||
click: () => this.platform.setClipboard({
|
||||
text: item.fullPath,
|
||||
}),
|
||||
label: this.translate.instant('Copy full path'),
|
||||
},
|
||||
]
|
||||
if (!item.isDirectory) {
|
||||
items.push({
|
||||
click: () => this.edit(item, panel.sftp),
|
||||
label: this.translate.instant('Edit locally'),
|
||||
})
|
||||
}
|
||||
return items
|
||||
}
|
||||
|
||||
private async edit (item: SFTPFile, sftp: SFTPSession) {
|
||||
|
Loading…
Reference in New Issue
Block a user