common table for switches

This commit is contained in:
Devaev Maxim 2021-05-19 10:06:50 +03:00
parent 0ab1427c28
commit d18c27744f
3 changed files with 56 additions and 59 deletions

View File

@ -182,9 +182,8 @@
</tr>
</table>
</div>
<div class="feature-disabled" id="hid-mouse-squash">
<hr>
<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,10 +200,8 @@
<label for="hid-connect-switch"><span class="switch-inner"></span><span class="switch"></span></label>
</div>
</td>
</table>
</div>
<hr>
<table class="kv">
</tr>
<tr>
<td>Mute HID input events:</td>
<td align="right">
<div class="switch-box">
@ -215,10 +209,8 @@
<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 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>
</tr>
</table>
<hr>
</div>
<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,6 +427,7 @@
</table>
<hr>
<table class="kv">
<tr>
<td>Infinite loop playback:</td>
<td align="right">
<div class="switch-box">
@ -442,6 +435,7 @@
<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,6 +466,7 @@
</table>
<hr>
<table class="kv">
<tr>
<td>Ask paste confirmation:</td>
<td align="right">
<div class="switch-box">
@ -479,6 +474,7 @@
<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>

View File

@ -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")
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")

View File

@ -13,8 +13,7 @@ mixin menu_message(icon, short, classes="")
sup(style="line-height:1")
block
mixin menu_switch(id, title, enabled, checked)
table(class="kv")
mixin menu_switch_notable(id, title, enabled, checked)
td #{title}:
td(align="right")
div(class="switch-box")
@ -23,6 +22,11 @@ mixin menu_switch(id, title, enabled, checked)
span(class="switch-inner")
span(class="switch")
mixin menu_switch(id, title, enabled, checked)
table(class="kv")
tr
+menu_switch_notable(id, title, enabled, checked)
ul(id="navbar")
li(class="left")
a(id="logo" href="/") &larr;&nbsp;&nbsp;