moved menu zone handling into terminus-electron

This commit is contained in:
Eugene Pankov
2021-06-17 20:38:20 +02:00
parent cdf97f3b31
commit 96ce42461d
5 changed files with 60 additions and 58 deletions

View File

@@ -20,16 +20,18 @@ export class WinSCPContextMenu extends TabContextMenuItemProvider {
if (!(tab instanceof SSHTabComponent) || !tab.connection) {
return []
}
if (this.hostApp.platform !== Platform.Windows || !this.ssh.getWinSCPPath()) {
return []
}
return [
{
const items = [{
label: 'Open SFTP panel',
click: () => tab.openSFTP(),
}]
if (this.hostApp.platform === Platform.Windows && this.ssh.getWinSCPPath()) {
items.push({
label: 'Launch WinSCP',
click: (): void => {
this.ssh.launchWinSCP(tab.session!)
},
},
]
})
}
return items
}
}