mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
fixed switch
This commit is contained in:
parent
73d0656f64
commit
b56ff5034a
@ -48,9 +48,13 @@ export function Gpio() {
|
||||
for (let type of ["switch", "button"]) {
|
||||
let el = $(`gpio-${type}-${channel}`);
|
||||
if (el) {
|
||||
wm.switchEnabled(el, !state.outputs[channel].busy);
|
||||
wm.switchEnabled(el, state.outputs[channel].online && !state.outputs[channel].busy);
|
||||
}
|
||||
}
|
||||
let el = $(`gpio-switch-${channel}`);
|
||||
if (el) {
|
||||
el.checked = state.outputs[channel].state;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (let el of $$$(".gpio-led")) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user