[pve-devel] [PATCH novnc 3/4] add patch for proper hiding of buttons
Dominik Csapak
d.csapak at proxmox.com
Fri Dec 17 11:19:58 CET 2021
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
...-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 <d.csapak at proxmox.com>
+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 <d.csapak at proxmox.com>
+---
+ 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
More information about the pve-devel
mailing list