web: locator switch

This commit is contained in:
Maxim Devaev 2022-11-23 04:45:21 +03:00
parent edc370168c
commit 3b4792882b
4 changed files with 29 additions and 0 deletions

View File

@ -40,6 +40,9 @@ kvmd:
drivers:
__gpio__:
device: /dev/kvmd-gpio
__v4_locator__:
type: locator
device: /dev/kvmd-gpio
relay:
type: hidrelay
device: /dev/hidraw0
@ -58,6 +61,13 @@ kvmd:
pulse:
delay: 0
__v4_locator__:
driver: __v4_locator__
pin: 12
mode: output
pulse:
delay: 0
led1:
pin: 19
mode: input

View File

@ -325,6 +325,15 @@
</div>
</td>
</tr>
<tr class="feature-disabled" id="v4-locator">
<td>Enable locator LED:</td>
<td align="right">
<div class="switch-box">
<input class="gpio-switch" disabled type="checkbox" id="gpio-switch-__v4_locator__" data-channel="__v4_locator__">
<label for="gpio-switch-__v4_locator__"><span class="switch-inner"></span><span class="switch"></span></label>
</div>
</td>
</tr>
<tr>
<td>Ask page close confirmation:</td>
<td align="right">

View File

@ -100,6 +100,15 @@ li(id="system-dropdown" class="right")
label(for="gpio-switch-__v3_usb_breaker__")
span(class="switch-inner")
span(class="switch")
tr(id="v4-locator" class="feature-disabled")
td Enable locator LED:
td(align="right")
div(class="switch-box")
input(disabled type="checkbox" id="gpio-switch-__v4_locator__" class="gpio-switch"
data-channel="__v4_locator__")
label(for="gpio-switch-__v4_locator__")
span(class="switch-inner")
span(class="switch")
tr
+menu_switch_notable("page-close-ask-switch", "Ask page close confirmation", true, true)
hr

View File

@ -114,6 +114,7 @@ export function Gpio(__recorder) {
}
tools.feature.setEnabled($("v3-usb-breaker"), ("__v3_usb_breaker__" in model.scheme.outputs));
tools.feature.setEnabled($("v4-locator"), ("__v4_locator__" in model.scheme.outputs));
tools.feature.setEnabled($("system-tool-wol"), ("__wol__" in model.scheme.outputs));
self.setState(__state);