]> git.proxmox.com Git - novnc-pve.git/commitdiff
add patch for proper hiding of buttons
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 17 Dec 2021 10:19:58 +0000 (11:19 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 21 Dec 2021 10:20:39 +0000 (11:20 +0100)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
debian/patches/0015-create-own-class-for-hidden-buttons.patch [new file with mode: 0644]
debian/patches/series

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 (file)
index 0000000..76bc2cb
--- /dev/null
@@ -0,0 +1,58 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Dominik Csapak <d.csapak@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@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;
++}
index 217c61c331c770e68f4fdafe277bc4360267feb3..49139242dbfb50353ac30cd9a377ba78f8ea5d43 100644 (file)
@@ -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