summaryrefslogtreecommitdiff
path: root/vnc_lite.html
diff options
context:
space:
mode:
authorSamuel Mannehed <samuel@cendio.se>2018-08-16 12:07:31 +0200
committerSamuel Mannehed <samuel@cendio.se>2018-08-16 13:33:35 +0200
commit22000b93d5aa3d12823e7440533e8eb25739e9c0 (patch)
treee2380c4e54477f20dbef8f252bdeefd2de14952e /vnc_lite.html
parenta793df3d6d472ba028075e4af5410af28a117c82 (diff)
downloadnovnc-22000b93d5aa3d12823e7440533e8eb25739e9c0.tar.gz
Handle if desktopName isn't set when connected
We can't guarantee that the desktopName event has been fired before the connect event.
Diffstat (limited to 'vnc_lite.html')
-rw-r--r--vnc_lite.html12
1 files changed, 10 insertions, 2 deletions
diff --git a/vnc_lite.html b/vnc_lite.html
index e5ab3c2..9f766fb 100644
--- a/vnc_lite.html
+++ b/vnc_lite.html
@@ -131,11 +131,19 @@
function connected(e) {
document.getElementById('sendCtrlAltDelButton').disabled = false;
+
+ let encryption;
if (WebUtil.getConfigVar('encrypt',
(window.location.protocol === "https:"))) {
- status("Connected (encrypted) to " + desktopName, "normal");
+ encryption = "unencrypted";
+ } else {
+ encryption = "encrypted";
+ }
+
+ if (desktopName) {
+ status("Connected (" + encryption + ") to " + desktopName, "normal");
} else {
- status("Connected (unencrypted) to " + desktopName, "normal");
+ status("Connected (" + encryption + ")", "normal");
}
}