refactoring

This commit is contained in:
Devaev Maxim
2019-11-08 01:34:30 +03:00
parent b261c2695c
commit 3c1681fd2b
2 changed files with 2 additions and 10 deletions

View File

@@ -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");