mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-11 06:59:59 +00: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[]> {
|
async getItems (item: SFTPFile, panel: SFTPPanelComponent): Promise<MenuItemOptions[]> {
|
||||||
if (item.isDirectory) {
|
const items: MenuItemOptions[] = [
|
||||||
return []
|
|
||||||
}
|
|
||||||
return [
|
|
||||||
{
|
{
|
||||||
click: () => this.edit(item, panel.sftp),
|
click: () => this.platform.setClipboard({
|
||||||
label: this.translate.instant('Edit locally'),
|
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) {
|
private async edit (item: SFTPFile, sftp: SFTPSession) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user