We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61c95b4 commit 1317e14Copy full SHA for 1317e14
fs/script.js
@@ -787,16 +787,11 @@ function loadLedStatus() {
787
fetch('/led_status')
788
.then(response => response.json())
789
.then(data => {
790
- const {
791
- r,
792
- g,
793
- b,
794
- mode
795
- } = data;
+ const { r, g, b, use_rgb } = data;
796
const hex = "#" + [r, g, b].map(x => x.toString(16).padStart(2, '0')).join('');
797
document.getElementById('ledColorPicker').value = hex;
798
document.getElementById('colorPreview').style.backgroundColor = hex;
799
- document.getElementById('colorMode').checked = mode === "true";
+ document.getElementById('colorMode').checked = use_rgb === true;
800
})
801
.catch(err => console.error("Failed to load LED status:", err));
802
}
0 commit comments