mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
refactoring
This commit is contained in:
parent
b261c2695c
commit
3c1681fd2b
@ -45,11 +45,7 @@ export function Atx() {
|
||||
|
||||
self.setState = function(state) {
|
||||
if (state) {
|
||||
if (state.enabled) {
|
||||
$("atx-dropdown").classList.remove("feature-disabled");
|
||||
} else {
|
||||
$("atx-dropdown").classList.add("feature-disabled");
|
||||
}
|
||||
$("atx-dropdown").classList.toggle("feature-disabled", !state.enabled);
|
||||
}
|
||||
|
||||
$("atx-power-led").className = ((state && state.leds.power) ? "led-green" : "led-gray");
|
||||
|
||||
@ -64,11 +64,7 @@ export function Mouse() {
|
||||
|
||||
self.setSocket = function(ws) {
|
||||
__ws = ws;
|
||||
if (ws) {
|
||||
$("stream-box").classList.add("stream-box-mouse-enabled");
|
||||
} else {
|
||||
$("stream-box").classList.remove("stream-box-mouse-enabled");
|
||||
}
|
||||
$("stream-box").classList.toggle("stream-box-mouse-enabled", ws);
|
||||
__updateLeds();
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user