refactor: revert openRemoteFolder function to member function (not static)
This commit is contained in:
		@@ -68,12 +68,12 @@ export default class DSHome {
 | 
				
			|||||||
                .then((_res) => {
 | 
					                .then((_res) => {
 | 
				
			||||||
                  if (_res == 'success') {
 | 
					                  if (_res == 'success') {
 | 
				
			||||||
                    //  only success then open folder
 | 
					                    //  only success then open folder
 | 
				
			||||||
                    RemoteContainer.openRemoteFolder(data.host, data.port, data.username, data.path);
 | 
					                    this.remoteContainer.openRemoteFolder(data.host, data.port, data.username, data.path);
 | 
				
			||||||
                  }
 | 
					                  }
 | 
				
			||||||
                })
 | 
					                })
 | 
				
			||||||
              break;
 | 
					              break;
 | 
				
			||||||
            case 'openRemoteFolder':
 | 
					            case 'openRemoteFolder':
 | 
				
			||||||
              RemoteContainer.openRemoteFolder(data.host, data.port, data.username, data.path);
 | 
					              this.remoteContainer.openRemoteFolder(data.host, data.port, data.username, data.path);
 | 
				
			||||||
              break;
 | 
					              break;
 | 
				
			||||||
            case 'getDevstarDomain':
 | 
					            case 'getDevstarDomain':
 | 
				
			||||||
              panel.webview.postMessage({ command: 'getDevstarDomain', data: { devstarDomain: this.devstarDomain } })
 | 
					              panel.webview.postMessage({ command: 'getDevstarDomain', data: { devstarDomain: this.devstarDomain } })
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -137,9 +137,9 @@ export default class RemoteContainer {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  static openRemoteFolder(host: string, port: number, username: string, path: string): void {
 | 
					  openRemoteFolder(host: string, port: number, username: string, path: string): void {
 | 
				
			||||||
    var host = `${host}-${port}`
 | 
					    // var host = `${host}-${port}`
 | 
				
			||||||
    const command = `code --remote ssh-remote+${username}@${host} ${path} --reuse-window`
 | 
					    const command = `code --remote ssh-remote+${username}@${host}:${port} ${path} --reuse-window`
 | 
				
			||||||
    let terminal = vscode.window.activeTerminal || vscode.window.createTerminal(`Ext Terminal`);
 | 
					    let terminal = vscode.window.activeTerminal || vscode.window.createTerminal(`Ext Terminal`);
 | 
				
			||||||
    terminal.show(true);
 | 
					    terminal.show(true);
 | 
				
			||||||
    terminal.sendText(command);
 | 
					    terminal.sendText(command);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user