From 866c2772f035e0948e6f0d475db9438db8c0efe4 Mon Sep 17 00:00:00 2001 From: Ryan Kuba Date: Tue, 14 Mar 2023 11:29:44 -0700 Subject: [PATCH] Hide lossless if not supported and tweak logo style (#61) * Hide lossless if not supported and tweak logo style Co-authored-by: ryan.kuba Co-authored-by: mattmcclaskey --- app/styles/base.css | 4 ++-- app/ui.js | 15 +++++++++++++++ vnc.html | 7 ------- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/app/styles/base.css b/app/styles/base.css index c6eb255a..002d9b4a 100644 --- a/app/styles/base.css +++ b/app/styles/base.css @@ -911,8 +911,8 @@ select:active { text-shadow: 0.1em 0.1em 0 black; margin-bottom: 0px; background: white; - padding-top: 5px; - padding-bottom: 5px; + padding: 5px; + border-radius: 5px; } .noVNC_logo img { width: 45% diff --git a/app/ui.js b/app/ui.js index 4d7bc940..4c4e3ef1 100644 --- a/app/ui.js +++ b/app/ui.js @@ -135,6 +135,8 @@ const UI = { .addEventListener('click', UI.hideStatus); UI.openControlbar(); + // + UI.updateVisualState('init'); document.documentElement.classList.remove("noVNC_loading"); @@ -197,6 +199,19 @@ const UI = { UI.initSetting('logging', 'warn'); UI.updateLogging(); + // Stream Quality Presets + let qualityDropdown = document.getElementById("noVNC_setting_video_quality"); + let supportsSharedArrayBuffers = typeof SharedArrayBuffer !== "undefined"; + qualityDropdown.appendChild(Object.assign(document.createElement("option"),{value:0,label:"Static"})) + qualityDropdown.appendChild(Object.assign(document.createElement("option"),{value:1,label:"Low"})) + qualityDropdown.appendChild(Object.assign(document.createElement("option"),{value:2,label:"Medium"})) + qualityDropdown.appendChild(Object.assign(document.createElement("option"),{value:3,label:"High"})) + qualityDropdown.appendChild(Object.assign(document.createElement("option"),{value:4,label:"Extreme"})) + if (supportsSharedArrayBuffers) { + qualityDropdown.appendChild(Object.assign(document.createElement("option"),{value:5,label:"Lossless"})) + } + qualityDropdown.appendChild(Object.assign(document.createElement("option"),{value:10,label:"Custom"})) + // if port == 80 (or 443) then it won't be present and should be // set manually let port = window.location.port; diff --git a/vnc.html b/vnc.html index 318878c1..f7dad263 100644 --- a/vnc.html +++ b/vnc.html @@ -353,13 +353,6 @@