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)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id F36728517F for ; Fri, 17 Dec 2021 11:20:06 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EB31029C5D for ; Fri, 17 Dec 2021 11:20:06 +0100 (CET) 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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id C6C9229C38 for ; Fri, 17 Dec 2021 11:20:05 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E42CF45399 for ; Fri, 17 Dec 2021 11:19:59 +0100 (CET) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Fri, 17 Dec 2021 11:19:58 +0100 Message-Id: <20211217101959.1708181-4-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211217101959.1708181-1-d.csapak@proxmox.com> References: <20211217101959.1708181-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.171 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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 3/4] add patch for proper hiding of buttons 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: Fri, 17 Dec 2021 10:20:07 -0000 Signed-off-by: Dominik Csapak --- ...-create-own-class-for-hidden-buttons.patch | 58 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 59 insertions(+) create mode 100644 debian/patches/0015-create-own-class-for-hidden-buttons.patch diff --git a/debian/patches/0015-create-own-class-for-hidden-buttons.patch b/debian/patches/0015-create-own-class-for-hidden-buttons.patch new file mode 100644 index 0000000..76bc2cb --- /dev/null +++ b/debian/patches/0015-create-own-class-for-hidden-buttons.patch @@ -0,0 +1,58 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Dominik Csapak +Date: Thu, 16 Dec 2021 14:31:20 +0100 +Subject: [PATCH] create own class for hidden buttons + +since novnc itself sometimes triggers a removal of their '_hidden' +class, even if we hid it. This way the buttons stay hidden even then. + +Signed-off-by: Dominik Csapak +--- + app/pve.js | 8 ++++---- + app/styles/pve.css | 4 ++++ + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/app/pve.js b/app/pve.js +index 0ab825a..486bd5c 100644 +--- a/app/pve.js ++++ b/app/pve.js +@@ -293,15 +293,15 @@ PVEUI.prototype = { + + // show/hide the buttons + document.getElementById('noVNC_disconnect_button') +- .classList.add('noVNC_hidden'); ++ .classList.add('pve_hidden'); + if (me.consoletype === 'kvm') { + document.getElementById('noVNC_clipboard_button') +- .classList.add('noVNC_hidden'); ++ .classList.add('pve_hidden'); + } + + if (me.consoletype === 'shell' || me.consoletype === 'upgrade') { + document.getElementById('pve_commands_button') +- .classList.add('noVNC_hidden'); ++ .classList.add('pve_hidden'); + } + + // add command logic +@@ -326,7 +326,7 @@ PVEUI.prototype = { + me.pve_vm_command(item.cmd); + }; + } else { +- el.classList.add('noVNC_hidden'); ++ el.classList.add('pve_hidden'); + } + }); + }, +diff --git a/app/styles/pve.css b/app/styles/pve.css +index eaeb5cb..18126b0 100644 +--- a/app/styles/pve.css ++++ b/app/styles/pve.css +@@ -40,3 +40,7 @@ + border-color: rgba(0, 0, 0, 0.4); + background: #5BA8DF; + } ++ ++.noVNC_button.pve_hidden { ++ display: none; ++} diff --git a/debian/patches/series b/debian/patches/series index 217c61c..4913924 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -12,3 +12,4 @@ 0012-pass-custom-command-to-vnc.patch 0013-Revert-Remove-the-default-value-of-wsProtocols.patch 0014-avoid-passing-deprecated-upgrade-parameter.patch +0015-create-own-class-for-hidden-buttons.patch -- 2.30.2