all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH novnc 3/4] add patch for proper hiding of buttons
Date: Fri, 17 Dec 2021 11:19:58 +0100	[thread overview]
Message-ID: <20211217101959.1708181-4-d.csapak@proxmox.com> (raw)
In-Reply-To: <20211217101959.1708181-1-d.csapak@proxmox.com>

Signed-off-by: Dominik Csapak <d.csapak@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@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;
++}
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





  parent reply	other threads:[~2021-12-17 10:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 10:19 [pve-devel] [PATCH novnc 0/4] upgrade novnc to 1.3.0 Dominik Csapak
2021-12-17 10:19 ` [pve-devel] [PATCH novnc 1/4] " Dominik Csapak
2021-12-17 10:19 ` [pve-devel] [PATCH novnc 2/4] rebase patches for 1.3.0 Dominik Csapak
2021-12-17 10:19 ` Dominik Csapak [this message]
2021-12-17 10:19 ` [pve-devel] [PATCH novnc 4/4] use esbuild instead of node-es6-module-transpiler Dominik Csapak
2021-12-21 10:24 ` [pve-devel] applied-series: [PATCH novnc 0/4] upgrade novnc to 1.3.0 Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211217101959.1708181-4-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal