summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-05-19 10:06:50 +0300
committerDevaev Maxim <[email protected]>2021-05-19 10:06:50 +0300
commitd18c27744f5a076683c0101f14a8ce5a0ac4b671 (patch)
treef095d825bf016f6252262866fede81caa4909997
parent0ab1427c286605c64751f5c8a457ed8e9429a697 (diff)
common table for switches
-rw-r--r--web/kvm/index.html76
-rw-r--r--web/kvm/navbar-system.pug21
-rw-r--r--web/kvm/navbar.pug18
3 files changed, 56 insertions, 59 deletions
diff --git a/web/kvm/index.html b/web/kvm/index.html
index 7f1e1932..5c580c6f 100644
--- a/web/kvm/index.html
+++ b/web/kvm/index.html
@@ -182,9 +182,8 @@
</tr>
</table>
</div>
- <div class="feature-disabled" id="hid-mouse-squash">
- <hr>
- <table class="kv">
+ <table class="kv">
+ <tr class="feature-disabled" id="hid-mouse-squash">
<td>Squash relative mouse moves:</td>
<td align="right">
<div class="switch-box">
@@ -192,11 +191,8 @@
<label for="hid-mouse-squash-switch"><span class="switch-inner"></span><span class="switch"></span></label>
</div>
</td>
- </table>
- </div>
- <div class="feature-disabled" id="hid-connect">
- <hr>
- <table class="kv">
+ </tr>
+ <tr class="feature-disabled" id="hid-connect">
<td>Connect HID to Server:</td>
<td align="right">
<div class="switch-box">
@@ -204,21 +200,17 @@
<label for="hid-connect-switch"><span class="switch-inner"></span><span class="switch"></span></label>
</div>
</td>
- </table>
- </div>
- <hr>
- <table class="kv">
- <td>Mute HID input events:</td>
- <td align="right">
- <div class="switch-box">
- <input type="checkbox" id="hid-mute-switch">
- <label for="hid-mute-switch"><span class="switch-inner"></span><span class="switch"></span></label>
- </div>
- </td>
- </table>
- <hr>
- <div class="feature-disabled" id="v3-usb-breaker">
- <table class="kv">
+ </tr>
+ <tr>
+ <td>Mute HID input events:</td>
+ <td align="right">
+ <div class="switch-box">
+ <input type="checkbox" id="hid-mute-switch">
+ <label for="hid-mute-switch"><span class="switch-inner"></span><span class="switch"></span></label>
+ </div>
+ </td>
+ </tr>
+ <tr class="feature-disabled" id="v3-usb-breaker">
<td>Connect main USB to Server:</td>
<td align="right">
<div class="switch-box">
@@ -226,9 +218,9 @@
<label for="gpio-switch-__v3_usb_breaker__"><span class="switch-inner"></span><span class="switch"></span></label>
</div>
</td>
- </table>
- <hr>
- </div>
+ </tr>
+ </table>
+ <hr>
<div class="buttons buttons-row">
<button class="row50" data-force-hide-menu id="show-keyboard-button">&bull; Show keyboard</button>
<button class="row50" disabled id="hid-reset-button">Reset HID</button>
@@ -435,13 +427,15 @@
</table>
<hr>
<table class="kv">
- <td>Infinite loop playback:</td>
- <td align="right">
- <div class="switch-box">
- <input disabled type="checkbox" id="hid-recorder-loop-switch">
- <label for="hid-recorder-loop-switch"><span class="switch-inner"></span><span class="switch"></span></label>
- </div>
- </td>
+ <tr>
+ <td>Infinite loop playback:</td>
+ <td align="right">
+ <div class="switch-box">
+ <input disabled type="checkbox" id="hid-recorder-loop-switch">
+ <label for="hid-recorder-loop-switch"><span class="switch-inner"></span><span class="switch"></span></label>
+ </div>
+ </td>
+ </tr>
</table>
<hr>
<input type="file" id="hid-recorder-new-script-file">
@@ -472,13 +466,15 @@
</table>
<hr>
<table class="kv">
- <td>Ask paste confirmation:</td>
- <td align="right">
- <div class="switch-box">
- <input checked type="checkbox" id="hid-pak-ask-switch">
- <label for="hid-pak-ask-switch"><span class="switch-inner"></span><span class="switch"></span></label>
- </div>
- </td>
+ <tr>
+ <td>Ask paste confirmation:</td>
+ <td align="right">
+ <div class="switch-box">
+ <input checked type="checkbox" id="hid-pak-ask-switch">
+ <label for="hid-pak-ask-switch"><span class="switch-inner"></span><span class="switch"></span></label>
+ </div>
+ </td>
+ </tr>
</table>
<hr>
<div class="text"></div>
diff --git a/web/kvm/navbar-system.pug b/web/kvm/navbar-system.pug
index 7548852f..3d32c260 100644
--- a/web/kvm/navbar-system.pug
+++ b/web/kvm/navbar-system.pug
@@ -48,17 +48,14 @@ li(class="right")
tr
td Mouse:
td #[div(id="hid-outputs-mouse" class="radio-box")]
- div(id="hid-mouse-squash" class="feature-disabled")
- hr
- +menu_switch("hid-mouse-squash-switch", "Squash relative mouse moves", true, true)
- div(id="hid-connect" class="feature-disabled")
- hr
- +menu_switch("hid-connect-switch", "Connect HID to Server", true, true)
- hr
- +menu_switch("hid-mute-switch", "Mute HID input events", true, false)
- hr
- div(id="v3-usb-breaker" class="feature-disabled")
- table(class="kv")
+ table(class="kv")
+ tr(id="hid-mouse-squash" class="feature-disabled")
+ +menu_switch_notable("hid-mouse-squash-switch", "Squash relative mouse moves", true, true)
+ tr(id="hid-connect" class="feature-disabled")
+ +menu_switch_notable("hid-connect-switch", "Connect HID to Server", true, true)
+ tr
+ +menu_switch_notable("hid-mute-switch", "Mute HID input events", true, false)
+ tr(id="v3-usb-breaker" class="feature-disabled")
td Connect main USB to Server:
td(align="right")
div(class="switch-box")
@@ -69,7 +66,7 @@ li(class="right")
label(for="gpio-switch-__v3_usb_breaker__")
span(class="switch-inner")
span(class="switch")
- hr
+ hr
div(class="buttons buttons-row")
button(data-force-hide-menu id="show-keyboard-button" class="row50") &bull; Show keyboard
button(disabled id="hid-reset-button" class="row50") Reset HID
diff --git a/web/kvm/navbar.pug b/web/kvm/navbar.pug
index d345f1dd..c86d5cb6 100644
--- a/web/kvm/navbar.pug
+++ b/web/kvm/navbar.pug
@@ -13,15 +13,19 @@ mixin menu_message(icon, short, classes="")
sup(style="line-height:1")
block
+mixin menu_switch_notable(id, title, enabled, checked)
+ td #{title}:
+ td(align="right")
+ div(class="switch-box")
+ input(checked=checked disabled=!enabled type="checkbox" id=id)
+ label(for=id)
+ span(class="switch-inner")
+ span(class="switch")
+
mixin menu_switch(id, title, enabled, checked)
table(class="kv")
- td #{title}:
- td(align="right")
- div(class="switch-box")
- input(checked=checked disabled=!enabled type="checkbox" id=id)
- label(for=id)
- span(class="switch-inner")
- span(class="switch")
+ tr
+ +menu_switch_notable(id, title, enabled, checked)
ul(id="navbar")
li(class="left")