Update additional display titles

This commit is contained in:
Chris Hunt 2023-10-18 17:43:15 +01:00
parent fb324dfcf2
commit 4c1977f24a
No known key found for this signature in database
3 changed files with 5 additions and 1 deletions

View File

@ -2842,6 +2842,7 @@ const UI = {
// UI.rfb.applyScreenPlan(screenPlan); // applyScreenPlan is triggered in UI.updateMonitors // UI.rfb.applyScreenPlan(screenPlan); // applyScreenPlan is triggered in UI.updateMonitors
UI.updateMonitors(screenPlan) UI.updateMonitors(screenPlan)
UI.rfb.identify(UI.monitors)
}, },
//Helper to add options to dropdown. //Helper to add options to dropdown.

View File

@ -109,6 +109,8 @@ const UI = {
//attach this secondary display to the primary display //attach this secondary display to the primary display
UI.screenID = UI.rfb.attachSecondaryDisplay(); UI.screenID = UI.rfb.attachSecondaryDisplay();
document.querySelector('title').textContent = 'Display ' + UI.screenID
if (supportsBinaryClipboard()) { if (supportsBinaryClipboard()) {
// explicitly request permission to the clipboard // explicitly request permission to the clipboard
@ -169,6 +171,7 @@ const UI = {
const screen = data.screens.find(el => el.id === UI.screenID) const screen = data.screens.find(el => el.id === UI.screenID)
document.getElementById('noVNC_identify_monitor').innerHTML = screen.num document.getElementById('noVNC_identify_monitor').innerHTML = screen.num
document.getElementById('noVNC_identify_monitor').classList.add("show") document.getElementById('noVNC_identify_monitor').classList.add("show")
document.querySelector('title').textContent = 'Display ' + screen.num + ' - ' + UI.screenID
setTimeout(() => { setTimeout(() => {
document.getElementById('noVNC_identify_monitor').classList.remove("show") document.getElementById('noVNC_identify_monitor').classList.remove("show")
}, 3500) }, 3500)

View File

@ -6,7 +6,7 @@
noVNC is licensed under the MPL 2.0 (see LICENSE.txt) noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
This file is licensed under the 2-Clause BSD license (see LICENSE.txt). This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
--> -->
<title>KasmVNC</title> <title>Additional Display</title>
<meta charset="utf-8"> <meta charset="utf-8">