Skip to content

Commit

Permalink
add server name provider
Browse files Browse the repository at this point in the history
  • Loading branch information
pfitzseb committed Nov 23, 2018
1 parent a0b7e8a commit d91624e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/ftp-remote-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,19 @@ class FtpRemoteEdit {
}
}

getCurrentServerName() {
const self = this;
return () => {
return new Promise((resolve, reject) => {
const selected = self.treeView.list.find('.selected');
if (selected.length === 0) reject('noservers')

let root = selected.view().getRoot();
resolve(root.name)
})
}
}

getCurrentServerConfig() {
const self = this;
return (reasonForRequest) => {
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
"versions": {
"0.1.0": "getCurrentServerConfig"
}
},
"ftp-remote.getCurrentServerName": {
"versions": {
"0.1.0": "getCurrentServerName"
}
}
},
"uriHandler": {
Expand Down

0 comments on commit d91624e

Please sign in to comment.