Skip to content

Commit

Permalink
Updating post_remote_browse api call to use hostname instead of sid. …
Browse files Browse the repository at this point in the history
…Updating remote browser and remote controls to use new sid api. Addresses #633
  • Loading branch information
alexsielicki committed Aug 31, 2016
1 parent ebf1eda commit e292138
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions web-server/js/slycat-remote-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ define("slycat-remote-browser", ["slycat-server-root", "slycat-web-client", "kno
component.selection = params.selection;
component.open_file_callback = params.open_file_callback;
component.raw_files = mapping.fromJS([]);
component.session_exists = params.session_exists;

component.icon_map = {
"application/x-directory" : "<span class='fa fa-folder-o'></span>",
Expand Down Expand Up @@ -125,7 +126,7 @@ define("slycat-remote-browser", ["slycat-server-root", "slycat-web-client", "kno
{
client.post_remote_browse(
{
sid : component.sid(),
hostname : component.hostname(),
path : path,
success : function(results)
{
Expand Down Expand Up @@ -161,9 +162,9 @@ define("slycat-remote-browser", ["slycat-server-root", "slycat-web-client", "kno
component.browse(component.path());
}

component.sid.subscribe(function(new_sid)
component.session_exists.subscribe(function(new_session_exists)
{
if(new_sid)
if(new_session_exists)
{
if(!component.path())
component.path(localStorage.getItem("slycat-remote-browser-path-" + component.hostname()) || "/");
Expand Down
2 changes: 1 addition & 1 deletion web-server/js/slycat-remote-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ define("slycat-remote-controls", ["slycat-server-root", "slycat-web-client", "kn
component.status = params.status || ko.observable(null);
component.status_type = params.status_type || ko.observable(null);
component.remote_hosts = mapping.fromJS([]);
component.session_exists = ko.observable(false);
component.session_exists = params.session_exists;

component.status_classes = ko.pureComputed(function()
{
Expand Down
2 changes: 1 addition & 1 deletion web-server/js/slycat-web-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ define("slycat-web-client", ["slycat-server-root", "jquery", "URI"], function(se
{
}),
type: "POST",
url: server_root + "remotes/" + params.sid + "/browse" + params.path,
url: server_root + "remotes/" + params.hostname + "/browse" + params.path,
success: function(result)
{
if(params.success)
Expand Down

0 comments on commit e292138

Please sign in to comment.