summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-10-08 13:26:50 +0300
committerMaxim Devaev <[email protected]>2022-10-08 13:26:50 +0300
commit2a238465828dd00ed1a52f401938ed0b3a029e8e (patch)
treea5a2a927480d8dfba75bc55a80b142167ac0b5a9 /web
parenta39d3dffbe837c15576615656df5a924bcd44831 (diff)
removed data-dont-hide-menu
Diffstat (limited to 'web')
-rw-r--r--web/kvm/index.html20
-rw-r--r--web/kvm/navbar-atx.pug2
-rw-r--r--web/kvm/navbar-gpio.pug2
-rw-r--r--web/kvm/navbar-health.pug4
-rw-r--r--web/kvm/navbar-macro.pug2
-rw-r--r--web/kvm/navbar-msd.pug2
-rw-r--r--web/kvm/navbar-shortcuts.pug2
-rw-r--r--web/kvm/navbar-system.pug4
-rw-r--r--web/kvm/navbar-text.pug2
-rw-r--r--web/share/js/wm.js6
10 files changed, 23 insertions, 23 deletions
diff --git a/web/kvm/index.html b/web/kvm/index.html
index b2d6789d..23ec576d 100644
--- a/web/kvm/index.html
+++ b/web/kvm/index.html
@@ -61,7 +61,7 @@
<li class="left"><a id="logo" href="/">&larr;&nbsp;&nbsp;<img class="svg-gray" src="/share/svg/logo.svg" alt="&amp;pi;-kvm"></a></li>
<div class="hidden" id="hw-health-dropdown">
<li class="left"><a class="menu-button" href="#"><img class="hidden" id="hw-health-undervoltage-led" src="/share/svg/led-undervoltage.svg"><img class="hidden" id="hw-health-overheating-led" src="/share/svg/led-overheating.svg"></a>
- <div class="menu" data-dont-hide-menu>
+ <div class="menu">
<div class="text">
<table>
<tr>
@@ -109,7 +109,7 @@
</div>
<div class="hidden" id="fan-health-dropdown">
<li class="left"><a class="menu-button" href="#"><img class="hidden" id="fan-health-led" src="/share/svg/led-fan.svg"></a>
- <div class="menu" data-dont-hide-menu>
+ <div class="menu">
<div class="text">
<table>
<tr>
@@ -140,7 +140,7 @@
</li>
</div>
<li class="right" id="system-dropdown"><a class="menu-button" href="#"><img class="led-gray" id="link-led" src="/share/svg/led-link.svg"><img class="led-gray" id="stream-led" src="/share/svg/led-stream.svg"><img class="led-gray" id="hid-keyboard-led" src="/share/svg/led-hid-keyboard.svg"><img class="led-gray" id="hid-mouse-led" src="/share/svg/led-hid-mouse.svg"><span>System</span></a>
- <div class="menu" data-dont-hide-menu id="system-menu">
+ <div class="menu" id="system-menu">
<table class="kv" style="width: calc(100% - 20px)">
<tr>
<td class="value">Runtime settings &amp; tools</td>
@@ -185,7 +185,7 @@
<tr class="feature-disabled" id="stream-resolution">
<td>Resolution:</td>
<td>
- <select disabled data-dont-hide-menu id="stream-resolution-selector"></select>
+ <select disabled id="stream-resolution-selector"></select>
</td>
</tr>
<tr class="feature-disabled" id="stream-quality">
@@ -336,7 +336,7 @@
</div>
</li>
<li class="right feature-disabled" id="atx-dropdown"><a class="menu-button" href="#"><img class="led-gray" id="atx-power-led" src="/share/svg/led-atx-power.svg"><img class="led-gray" id="atx-hdd-led" src="/share/svg/led-atx-hdd.svg"><span>ATX</span></a>
- <div class="menu" data-dont-hide-menu>
+ <div class="menu">
<div class="text"><b>Control the server's power<br></b><sub>Use the short click for ACPI shutdown</sub></div>
<hr>
<table class="kv">
@@ -360,7 +360,7 @@
</div>
</li>
<li class="right feature-disabled" id="msd-dropdown"><a class="menu-button" href="#"><img class="led-gray" id="msd-led" src="/share/svg/led-msd.svg"><span>Drive</span></a>
- <div class="menu" data-dont-hide-menu id="msd-menu">
+ <div class="menu" id="msd-menu">
<div class="text"><b>Mass Storage Drive: </b><span id="msd-status"></span><br></div>
<hr>
<div class="hidden" id="msd-message-offline">
@@ -571,7 +571,7 @@
</div>
</li>
<li class="right" id="macro-dropdown"><a class="menu-button" href="#"><img class="led-gray" id="hid-recorder-led" src="/share/svg/led-gear.svg"><span>Macro</span></a>
- <div class="menu" data-dont-hide-menu>
+ <div class="menu">
<div class="text"><b>Record and play HID/ATX/GPIO actions<br></b><sub>For security reasons, the record will not be saved on the PiKVM</sub></div>
<hr>
<div class="buttons buttons-row">
@@ -613,7 +613,7 @@
</div>
</li>
<li class="right" id="text-dropdown"><a class="menu-button" href="#"><img class="feature-disabled" id="stream-ocr-led" src="/share/svg/led-gear.svg"><span>Text</span></a>
- <div class="menu" data-dont-hide-menu>
+ <div class="menu">
<div class="text"><b>Paste text as keypress sequence<br></b><sub>Please note that PiKVM cannot switch the keyboard layout</sub></div>
<hr>
<div class="text">
@@ -682,7 +682,7 @@
</div>
</li>
<li class="right" id="shortcuts-dropdown"><a class="menu-button" href="#">Shortcuts</a>
- <div class="menu" data-dont-hide-menu>
+ <div class="menu">
<div class="text"><b>Quick keyboard shortcuts<br></b><sub>Also see <i>System &rarr; Show keyboard</i></sub></div>
<hr>
<div class="buttons">
@@ -748,7 +748,7 @@
</div>
</li>
<li class="right feature-disabled" id="gpio-dropdown"><a class="menu-button" id="gpio-menu-button" href="#"><span>GPIO</span></a>
- <div class="menu" data-dont-hide-menu id="gpio-menu"></div>
+ <div class="menu" id="gpio-menu"></div>
</li>
</ul>
<div class="window" id="stream-ocr-window">
diff --git a/web/kvm/navbar-atx.pug b/web/kvm/navbar-atx.pug
index 30bffaa2..6800bb9c 100644
--- a/web/kvm/navbar-atx.pug
+++ b/web/kvm/navbar-atx.pug
@@ -3,7 +3,7 @@ li(id="atx-dropdown" class="right feature-disabled")
+navbar_led("atx-power-led", "led-atx-power")
+navbar_led("atx-hdd-led", "led-atx-hdd")
span ATX
- div(data-dont-hide-menu class="menu")
+ div(class="menu")
div(class="text")
b Control the server's power#[br]
sub Use the short click for ACPI shutdown
diff --git a/web/kvm/navbar-gpio.pug b/web/kvm/navbar-gpio.pug
index e8424ef7..1693212f 100644
--- a/web/kvm/navbar-gpio.pug
+++ b/web/kvm/navbar-gpio.pug
@@ -1,4 +1,4 @@
li(id="gpio-dropdown" class="right feature-disabled")
a(class="menu-button" id="gpio-menu-button" href="#")
span GPIO
- div(data-dont-hide-menu id="gpio-menu" class="menu")
+ div(id="gpio-menu" class="menu")
diff --git a/web/kvm/navbar-health.pug b/web/kvm/navbar-health.pug
index 455f0339..bb2c5170 100644
--- a/web/kvm/navbar-health.pug
+++ b/web/kvm/navbar-health.pug
@@ -3,7 +3,7 @@ div(id="hw-health-dropdown" class="hidden")
a(class="menu-button" href="#")
+navbar_led("hw-health-undervoltage-led", "led-undervoltage", "hidden")
+navbar_led("hw-health-overheating-led", "led-overheating", "hidden")
- div(data-dont-hide-menu class="menu")
+ div(class="menu")
+menu_message("warning", "Raspberry Pi's health is at risk")
| This is not a drill! A red icon indicates a current issue,#[br]
| a yellow one that was observed since the device booted up
@@ -22,7 +22,7 @@ div(id="fan-health-dropdown" class="hidden")
li(class="left")
a(class="menu-button" href="#")
+navbar_led("fan-health-led", "led-fan", "hidden")
- div(data-dont-hide-menu class="menu")
+ div(class="menu")
+menu_message("warning", "Raspberry Pi's health is at risk")
| This is not a drill! A red icon indicates a current issue,#[br]
| a yellow one that was observed in the past
diff --git a/web/kvm/navbar-macro.pug b/web/kvm/navbar-macro.pug
index 73b88c63..cebc6678 100644
--- a/web/kvm/navbar-macro.pug
+++ b/web/kvm/navbar-macro.pug
@@ -2,7 +2,7 @@ li(id="macro-dropdown" class="right")
a(class="menu-button" href="#")
+navbar_led("hid-recorder-led", "led-gear")
span Macro
- div(data-dont-hide-menu class="menu")
+ div(class="menu")
div(class="text")
b Record and play HID/ATX/GPIO actions#[br]
sub For security reasons, the record will not be saved on the PiKVM
diff --git a/web/kvm/navbar-msd.pug b/web/kvm/navbar-msd.pug
index 14e2d956..b7ba1a75 100644
--- a/web/kvm/navbar-msd.pug
+++ b/web/kvm/navbar-msd.pug
@@ -2,7 +2,7 @@ li(id="msd-dropdown" class="right feature-disabled")
a(class="menu-button" href="#")
+navbar_led("msd-led", "led-msd")
span Drive
- div(data-dont-hide-menu id="msd-menu" class="menu")
+ div(id="msd-menu" class="menu")
div(class="text")
b Mass Storage Drive:
span(id="msd-status")
diff --git a/web/kvm/navbar-shortcuts.pug b/web/kvm/navbar-shortcuts.pug
index 7d53227f..adf5ef2c 100644
--- a/web/kvm/navbar-shortcuts.pug
+++ b/web/kvm/navbar-shortcuts.pug
@@ -1,6 +1,6 @@
li(id="shortcuts-dropdown" class="right")
a(class="menu-button" href="#") Shortcuts
- div(data-dont-hide-menu class="menu")
+ div(class="menu")
div(class="text")
b Quick keyboard shortcuts#[br]
sub Also see #[i System &rarr; Show keyboard]
diff --git a/web/kvm/navbar-system.pug b/web/kvm/navbar-system.pug
index 550325ae..7dbd3ebf 100644
--- a/web/kvm/navbar-system.pug
+++ b/web/kvm/navbar-system.pug
@@ -5,7 +5,7 @@ li(id="system-dropdown" class="right")
+navbar_led("hid-keyboard-led", "led-hid-keyboard")
+navbar_led("hid-mouse-led", "led-hid-mouse")
span System
- div(data-dont-hide-menu id="system-menu" class="menu")
+ div(id="system-menu" class="menu")
table(class="kv" style="width: calc(100% - 20px)")
tr
td(class="value") Runtime settings &amp; tools
@@ -25,7 +25,7 @@ li(id="system-dropdown" class="right")
table(class="kv" style="width: calc(100% - 20px)")
tr(id="stream-resolution" class="feature-disabled")
td Resolution:
- td #[select(disabled data-dont-hide-menu id="stream-resolution-selector")]
+ td #[select(disabled id="stream-resolution-selector")]
tr(id="stream-quality" class="feature-disabled")
td JPEG quality:
td #[input(disabled type="range" id="stream-quality-slider" class="slider")]
diff --git a/web/kvm/navbar-text.pug b/web/kvm/navbar-text.pug
index afc7a70b..510cdbe3 100644
--- a/web/kvm/navbar-text.pug
+++ b/web/kvm/navbar-text.pug
@@ -2,7 +2,7 @@ li(id="text-dropdown" class="right")
a(class="menu-button" href="#")
+navbar_led("stream-ocr-led", "led-gear", "feature-disabled")
span Text
- div(data-dont-hide-menu class="menu")
+ div(class="menu")
div(class="text")
b Paste text as keypress sequence#[br]
sub Please note that PiKVM cannot switch the keyboard layout
diff --git a/web/share/js/wm.js b/web/share/js/wm.js
index 20ea0805..afef708c 100644
--- a/web/share/js/wm.js
+++ b/web/share/js/wm.js
@@ -349,10 +349,10 @@ function __WindowManager() {
&& !event.target.closest(".modal")
) {
for (let el_item = event.target; el_item && el_item !== document; el_item = el_item.parentNode) {
- if (el_item.hasAttribute("data-force-hide-menu")) {
- break;
- } else if (el_item.hasAttribute("data-dont-hide-menu")) {
+ if (el_item.classList.contains("menu")) {
return;
+ } else if (el_item.hasAttribute("data-force-hide-menu")) {
+ break;
}
}
__closeAllMenues();