Commit 3c5b942f authored by ibuler's avatar ibuler

[Update] 右击没有node或资产为window不显示

parent d5c3f39c
......@@ -145,6 +145,9 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
}
onRightClick(event, treeId, treeNode) {
if (!treeNode || treeNode.isParent || treeNode.platform.toLowerCase() === 'windows') {
return null;
}
if (!treeNode && event.target.tagName.toLowerCase() !== 'button' && $(event.target).parents('a').length === 0) {
this.zTree.cancelSelectedNode();
this.showRMenu(event.clientX, event.clientY);
......@@ -190,7 +193,6 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
connectFileManager() {
const host = this.rightClickSelectNode;
console.log(host);
const id = NavList.List.length - 1;
if (host) {
NavList.List[id].nick = '[FILE]' + host.name;
......@@ -206,7 +208,6 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
}
connectTerminal() {
console.log('Connect terminal');
const host = this.rightClickSelectNode;
this.Connect(host);
}
......
......@@ -48,10 +48,9 @@ export class ElementNavComponent implements OnInit {
break;
}
case 'ConnectSFTP': {
window.open('/sftp/');
window.open('/luna/sftp/');
break;
}
case 'HideLeft': {
CleftbarComponent.Hide();
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment