mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-03 03:21:54 +08:00
refactoring
This commit is contained in:
@@ -48,7 +48,7 @@ export function Gpio() {
|
||||
for (let type of ["switch", "button"]) {
|
||||
let el = $(`gpio-${type}-${channel}`);
|
||||
if (el) {
|
||||
wm.switchEnabled(el, state.outputs[channel].online && !state.outputs[channel].busy);
|
||||
wm.setElementEnabled(el, state.outputs[channel].online && !state.outputs[channel].busy);
|
||||
}
|
||||
}
|
||||
let el = $(`gpio-switch-${channel}`);
|
||||
@@ -62,7 +62,7 @@ export function Gpio() {
|
||||
}
|
||||
for (let selector of [".gpio-switch", ".gpio-button"]) {
|
||||
for (let el of $$$(selector)) {
|
||||
wm.switchEnabled(el, false);
|
||||
wm.setElementEnabled(el, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user