Skip to content

Commit

Permalink
#1784: allow the pathname to be overriden, use whatever is set for th…
Browse files Browse the repository at this point in the history
…e connect or index page otherwise

git-svn-id: https://xpra.org/svn/Xpra/trunk@18725 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 15, 2018
1 parent 3666de5 commit 1e9e313
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/html5/connect.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ <h4 class="panel-title">Advanced options</h4>
<li class="list-group-item">
<input type="checkbox" id="video"> <span>Video (experimental) <input type="checkbox" id="mediasource_video"> Native decoding</span>
</li>
<li class="list-group-item">
<span>Server Path:</span>
<input title="path" type="text" class="form-control" id="path" placeholder="" size="16" maxlength="256">
</li>
<li class="list-group-item">
<span>Debugging</span>:<br/>
<input type="checkbox" id="debug_main"> <span>Main</span>,
Expand Down Expand Up @@ -282,7 +286,7 @@ <h4 class="panel-title">Advanced options</h4>
}
}
add_prop("submit", true);
var val_props = ["server", "port", "username", "password", "bandwidth_limit", "encoding", "keyboard_layout", "audio_codec"];
var val_props = ["server", "port", "path", "username", "password", "bandwidth_limit", "encoding", "keyboard_layout", "audio_codec"];
for (var i = 0; i < val_props.length; i++) {
var prop = val_props[i];
var value = document.getElementById(prop).value;
Expand Down Expand Up @@ -342,6 +346,7 @@ <h4 class="panel-title">Advanced options</h4>
link.setAttribute('href', url);
document.getElementById("server").value = getparam("server") || link.hostname;
document.getElementById("port").value = getparam("port") || link.port;
document.getElementById("path").value = getparam("path") || link.pathname;
document.getElementById("username").value = getparam("username") || "";
var https = document.location.protocol=="https:";
var ssl = getboolparam("ssl", https);
Expand Down
1 change: 1 addition & 0 deletions src/html5/css/signin.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ body {
-moz-box-sizing: border-box;
box-sizing: border-box;
font-size: 16px;
max-width: 16em;
}
.form-signin .form-control.command {
margin-left: 1.6em;
Expand Down
2 changes: 1 addition & 1 deletion src/html5/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
var server = getparam("server") || window.location.hostname;
var port = getparam("port") || window.location.port;
var ssl = getboolparam("ssl", https);
var path = getparam("path") || "";
var path = getparam("path") || window.location.pathname;
var encryption = getboolparam("encryption", false);
var key = getparam("key") || null;
var keyboard_layout = getparam("keyboard_layout") || null;
Expand Down

0 comments on commit 1e9e313

Please sign in to comment.