]> git.proxmox.com Git - novnc-pve.git/blob - debian/patches/0015-create-own-class-for-hidden-buttons.patch
ebfbb269ed7c21c1079c46f24978212887e3dc5f
[novnc-pve.git] / debian / patches / 0015-create-own-class-for-hidden-buttons.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Dominik Csapak <d.csapak@proxmox.com>
3 Date: Thu, 16 Dec 2021 14:31:20 +0100
4 Subject: [PATCH] create own class for hidden buttons
5
6 since novnc itself sometimes triggers a removal of their '_hidden'
7 class, even if we hid it. This way the buttons stay hidden even then.
8
9 Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
10 ---
11 app/pve.js | 8 ++++----
12 app/styles/pve.css | 4 ++++
13 2 files changed, 8 insertions(+), 4 deletions(-)
14
15 diff --git a/app/pve.js b/app/pve.js
16 index dfff1b0..4774e3a 100644
17 --- a/app/pve.js
18 +++ b/app/pve.js
19 @@ -302,15 +302,15 @@ PVEUI.prototype = {
20
21 // show/hide the buttons
22 document.getElementById('noVNC_disconnect_button')
23 - .classList.add('noVNC_hidden');
24 + .classList.add('pve_hidden');
25 if (me.consoletype === 'kvm') {
26 document.getElementById('noVNC_clipboard_button')
27 - .classList.add('noVNC_hidden');
28 + .classList.add('pve_hidden');
29 }
30
31 if (me.consoletype === 'shell' || me.consoletype === 'upgrade') {
32 document.getElementById('pve_commands_button')
33 - .classList.add('noVNC_hidden');
34 + .classList.add('pve_hidden');
35 }
36
37 // add command logic
38 @@ -335,7 +335,7 @@ PVEUI.prototype = {
39 me.pve_vm_command(item.cmd);
40 };
41 } else {
42 - el.classList.add('noVNC_hidden');
43 + el.classList.add('pve_hidden');
44 }
45 });
46 },
47 diff --git a/app/styles/pve.css b/app/styles/pve.css
48 index eaeb5cb..18126b0 100644
49 --- a/app/styles/pve.css
50 +++ b/app/styles/pve.css
51 @@ -40,3 +40,7 @@
52 border-color: rgba(0, 0, 0, 0.4);
53 background: #5BA8DF;
54 }
55 +
56 +.noVNC_button.pve_hidden {
57 + display: none;
58 +}