]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Restore page name after disconnect
authorNiko Lehto <nikle@cendio.se>
Wed, 4 Sep 2019 13:05:14 +0000 (15:05 +0200)
committerNiko Lehto <nikle@cendio.se>
Wed, 4 Sep 2019 13:05:14 +0000 (15:05 +0200)
app/ui.js

index 1909dee2e9804fad2388bced1773be44544896b6..4f683ea9578ec347edeb46600af87c6f06c6a7ba 100644 (file)
--- a/app/ui.js
+++ b/app/ui.js
@@ -17,6 +17,8 @@ import Keyboard from "../core/input/keyboard.js";
 import RFB from "../core/rfb.js";
 import * as WebUtil from "./webutil.js";
 
+const PAGE_TITLE = "noVNC";
+
 const UI = {
 
     connected: false,
@@ -1122,6 +1124,8 @@ const UI = {
             UI.showStatus(_("Disconnected"), 'normal');
         }
 
+        document.title = PAGE_TITLE;
+
         UI.openControlbar();
         UI.openConnectPanel();
     },
@@ -1615,7 +1619,7 @@ const UI = {
     updateDesktopName(e) {
         UI.desktopName = e.detail.name;
         // Display the desktop name in the document title
-        document.title = e.detail.name + " - noVNC";
+        document.title = e.detail.name + " - " + PAGE_TITLE;
     },
 
     bell(e) {