Skip to content

Commit

Permalink
show some server information
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed May 9, 2024
1 parent 5514525 commit c625024
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
23 changes: 18 additions & 5 deletions html5/connect.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ <h5>Version 13 beta</h5>
maxlength="5"
/>
<br />
<div id="server-info-box">
<span id="server-info" />
<br />
</div>
<label class="sr-only" for="username">Username</label>
<input
title="Username"
Expand Down Expand Up @@ -1381,8 +1385,17 @@ <h4 class="panel-title">Advanced options</h4>
);
}

function show_mode(is_proxy) {
Utilities.debug("show_mode(", is_proxy, ")");
function show_mode(mode, is_proxy) {
Utilities.debug("show_mode(", mode, ", ", is_proxy, ")");
let server_info = "";
let host_address = get_host_address(true);
if (mode.length > 0) {
server_info = host_address + " is a '" + mode + "' server";
}
else {
server_info = "no information available for " + host_address;
}
document.getElementById("server-info").innerText = server_info;
if (is_proxy) {
//show all options:
$("#action_connect_group").show();
Expand Down Expand Up @@ -1417,13 +1430,13 @@ <h4 class="panel-title">Advanced options</h4>
mode.indexOf("desktop") >= 0 ||
mode.indexOf("shadow") >= 0
) {
show_mode(false);
show_mode(mode, false);
} else {
show_mode(true);
show_mode(mode, true);
}
},
function (error) {
show_mode(true);
show_mode("", true);
}
);
}
Expand Down
6 changes: 6 additions & 0 deletions html5/css/signin.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,9 @@ div.container {
width: 1.2em;
height: 1.2em;
}

.form-signin span#server-info {
padding-left: 20px;
font-size: 11px;
font-style: italic;
}

0 comments on commit c625024

Please sign in to comment.