Restore page name after disconnect

This commit is contained in:
Niko Lehto 2019-09-04 15:05:14 +02:00
parent 8d6f686b59
commit c90245da25
1 changed files with 5 additions and 1 deletions

View File

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