From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 82D0070FD8 for ; Mon, 17 May 2021 12:13:26 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6CE502A578 for ; Mon, 17 May 2021 12:12:56 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id F22B72A56F for ; Mon, 17 May 2021 12:12:51 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id C9A3A43685 for ; Mon, 17 May 2021 12:12:51 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Mon, 17 May 2021 12:12:50 +0200 Message-Id: <20210517101250.11869-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.135 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH novnc] update patch to correctly hide the clipboard button X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2021 10:13:26 -0000 Signed-off-by: Dominik Csapak --- .../0001-add-PVE-specific-JS-code.patch | 27 ++++++++++++++++--- ...002-add-custom-fbresize-event-on-rfb.patch | 2 +- ...nge-scaling-when-toggling-fullscreen.patch | 2 +- ...rectory-for-fetching-images-js-files.patch | 4 +-- .../0011-add-localCursor-setting-to-rfb.patch | 2 +- 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/debian/patches/0001-add-PVE-specific-JS-code.patch b/debian/patches/0001-add-PVE-specific-JS-code.patch index 22dffe7..7800ada 100644 --- a/debian/patches/0001-add-PVE-specific-JS-code.patch +++ b/debian/patches/0001-add-PVE-specific-JS-code.patch @@ -13,9 +13,9 @@ Signed-off-by: Dominik Csapak Signed-off-by: Thomas Lamprecht --- app/pve.js | 418 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - app/ui.js | 66 +++++++-- + app/ui.js | 75 ++++++++-- vnc.html | 10 +- - 3 files changed, 480 insertions(+), 14 deletions(-) + 3 files changed, 487 insertions(+), 16 deletions(-) create mode 100644 app/pve.js diff --git a/app/pve.js b/app/pve.js @@ -443,7 +443,7 @@ index 0000000..e2c37fb + }, +}; diff --git a/app/ui.js b/app/ui.js -index c70743d..317f845 100644 +index c70743d..cae2b57 100644 --- a/app/ui.js +++ b/app/ui.js @@ -16,6 +16,7 @@ import keysyms from "../core/input/keysymdef.js"; @@ -562,7 +562,7 @@ index c70743d..317f845 100644 if (password === null) { password = undefined; } -@@ -1621,9 +1640,36 @@ const UI = { +@@ -1621,12 +1640,42 @@ const UI = { /* ------^------- * /EXTRA KEYS * ============== @@ -600,6 +600,25 @@ index c70743d..317f845 100644 updateViewOnly() { if (!UI.rfb) return; UI.rfb.viewOnly = UI.getSetting('view_only'); ++ if (!UI.PVE) return; ++ ++ let kvm = UI.PVE.consoletype === 'kvm'; + + // Hide input related buttons in view only mode + if (UI.rfb.viewOnly) { +@@ -1641,8 +1690,10 @@ const UI = { + .classList.remove('noVNC_hidden'); + document.getElementById('noVNC_toggle_extra_keys_button') + .classList.remove('noVNC_hidden'); +- document.getElementById('noVNC_clipboard_button') +- .classList.remove('noVNC_hidden'); ++ if (!kvm) { ++ document.getElementById('noVNC_clipboard_button') ++ .classList.remove('noVNC_hidden'); ++ } + } + }, + diff --git a/vnc.html b/vnc.html index 32f356f..5ec354a 100644 --- a/vnc.html diff --git a/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch b/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch index 50c3d6e..d4bc62b 100644 --- a/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch +++ b/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch @@ -13,7 +13,7 @@ Signed-off-by: Dominik Csapak 2 files changed, 21 insertions(+) diff --git a/app/ui.js b/app/ui.js -index 317f845..91bdcf4 100644 +index cae2b57..fdae7a2 100644 --- a/app/ui.js +++ b/app/ui.js @@ -1054,6 +1054,7 @@ const UI = { diff --git a/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch b/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch index f9ec196..a777e2f 100644 --- a/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch +++ b/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch @@ -12,7 +12,7 @@ Signed-off-by: Dominik Csapak 1 file changed, 11 insertions(+) diff --git a/app/ui.js b/app/ui.js -index 91bdcf4..ef2c77f 100644 +index fdae7a2..7237d00 100644 --- a/app/ui.js +++ b/app/ui.js @@ -1239,6 +1239,13 @@ const UI = { diff --git a/debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch b/debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch index d14dabc..872fdef 100644 --- a/debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch +++ b/debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch @@ -13,7 +13,7 @@ Signed-off-by: Dominik Csapak 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/app/ui.js b/app/ui.js -index ef2c77f..1605565 100644 +index 7237d00..17e86a7 100644 --- a/app/ui.js +++ b/app/ui.js @@ -64,7 +64,7 @@ const UI = { @@ -25,7 +25,7 @@ index ef2c77f..1605565 100644 .then((packageInfo) => { Array.from(document.getElementsByClassName('noVNC_version')).forEach(el => el.innerText = packageInfo.version); }) -@@ -1767,7 +1767,7 @@ l10n.setup(LINGUAS); +@@ -1772,7 +1772,7 @@ l10n.setup(LINGUAS); if (l10n.language === "en" || l10n.dictionary !== undefined) { UI.prime(); } else { diff --git a/debian/patches/0011-add-localCursor-setting-to-rfb.patch b/debian/patches/0011-add-localCursor-setting-to-rfb.patch index e0301da..f36812f 100644 --- a/debian/patches/0011-add-localCursor-setting-to-rfb.patch +++ b/debian/patches/0011-add-localCursor-setting-to-rfb.patch @@ -15,7 +15,7 @@ Signed-off-by: Thomas Lamprecht 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/app/ui.js b/app/ui.js -index d604067..d8126bc 100644 +index 17e86a7..ded4bf6 100644 --- a/app/ui.js +++ b/app/ui.js @@ -166,6 +166,7 @@ const UI = { -- 2.20.1