diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/share/js/kvm/gpio.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/web/share/js/kvm/gpio.js b/web/share/js/kvm/gpio.js index 56bd5d14..cbbe219b 100644 --- a/web/share/js/kvm/gpio.js +++ b/web/share/js/kvm/gpio.js @@ -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")) { |