]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Revert "Handle if desktopName isn't set.."
authorSamuel Mannehed <samuel@cendio.se>
Thu, 16 Aug 2018 13:49:26 +0000 (15:49 +0200)
committerSamuel Mannehed <samuel@cendio.se>
Thu, 16 Aug 2018 13:52:21 +0000 (15:52 +0200)
This reverts commit 22000b93d5aa3d12823e7440533e8eb25739e9c0. The
'desktopname' and the 'connect' events are dispatched by us in RFB and
are thus serial.

app/ui.js
vnc_lite.html

index 045c64fd48a76b979792d86dda1b58bd0a08a14f..c03f8d375712181cd58d49de4a6b3290f8f179ac 100644 (file)
--- a/app/ui.js
+++ b/app/ui.js
@@ -1074,14 +1074,10 @@ const UI = {
         UI.inhibit_reconnect = false;
 
         let msg;
-        if (UI.desktopName !== '') {
-            if (UI.getSetting('encrypt')) {
-                msg = _("Connected (encrypted) to ") + UI.desktopName;
-            } else {
-                msg = _("Connected (unencrypted) to ") + UI.desktopName;
-            }
+        if (UI.getSetting('encrypt')) {
+            msg = _("Connected (encrypted) to ") + UI.desktopName;
         } else {
-            msg = _("Connected");
+            msg = _("Connected (unencrypted) to ") + UI.desktopName;
         }
         UI.showStatus(msg);
         UI.updateVisualState('connected');
index 9f766fb1e97b16f3bcc4b8675b4e451758951336..e5ab3c2a71ca4f8f4069c3b35e2d2d787df664f1 100644 (file)
 
         function connected(e) {
             document.getElementById('sendCtrlAltDelButton').disabled = false;
-
-            let encryption;
             if (WebUtil.getConfigVar('encrypt',
                                      (window.location.protocol === "https:"))) {
-                encryption = "unencrypted";
-            } else {
-                encryption = "encrypted";
-            }
-
-            if (desktopName) {
-                status("Connected (" + encryption + ") to " + desktopName, "normal");
+                status("Connected (encrypted) to " + desktopName, "normal");
             } else {
-                status("Connected (" + encryption + ")", "normal");
+                status("Connected (unencrypted) to " + desktopName, "normal");
             }
         }