Commit 3c5b942f authored by ibuler's avatar ibuler

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

parent d5c3f39c
...@@ -145,6 +145,9 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges { ...@@ -145,6 +145,9 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
} }
onRightClick(event, treeId, treeNode) { 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) { if (!treeNode && event.target.tagName.toLowerCase() !== 'button' && $(event.target).parents('a').length === 0) {
this.zTree.cancelSelectedNode(); this.zTree.cancelSelectedNode();
this.showRMenu(event.clientX, event.clientY); this.showRMenu(event.clientX, event.clientY);
...@@ -190,7 +193,6 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges { ...@@ -190,7 +193,6 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
connectFileManager() { connectFileManager() {
const host = this.rightClickSelectNode; const host = this.rightClickSelectNode;
console.log(host);
const id = NavList.List.length - 1; const id = NavList.List.length - 1;
if (host) { if (host) {
NavList.List[id].nick = '[FILE]' + host.name; NavList.List[id].nick = '[FILE]' + host.name;
...@@ -206,7 +208,6 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges { ...@@ -206,7 +208,6 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
} }
connectTerminal() { connectTerminal() {
console.log('Connect terminal');
const host = this.rightClickSelectNode; const host = this.rightClickSelectNode;
this.Connect(host); this.Connect(host);
} }
......
...@@ -48,10 +48,9 @@ export class ElementNavComponent implements OnInit { ...@@ -48,10 +48,9 @@ export class ElementNavComponent implements OnInit {
break; break;
} }
case 'ConnectSFTP': { case 'ConnectSFTP': {
window.open('/sftp/'); window.open('/luna/sftp/');
break; break;
} }
case 'HideLeft': { case 'HideLeft': {
CleftbarComponent.Hide(); CleftbarComponent.Hide();
break; 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