sports feature improvements and real time brightness control

This commit is contained in:
Neythen
2021-10-25 19:42:00 +01:00
parent a1c9c3ba8f
commit e0c8cf8c1e
19 changed files with 75 additions and 35 deletions

View File

@@ -559,18 +559,27 @@ var startButton = document.getElementById("start-btn");
// start the display
startButton.addEventListener("click", () => {
var HTML = document.getElementById('display-format').innerHTML;
console.log('pressed');
console.log(HTML);
fetch("/start", {
method:"PUT",
body:JSON.stringify(HTML)
});
});
var brightnessButton = document.getElementById("brightness-btn");
// start the display
brightnessButton.addEventListener("click", () => {
let brightness = document.querySelectorAll(".brightness-text")[0].value;
console.log(brightness);
fetch("/brightness", {
method:"PUT",
body:JSON.stringify({'brightness':brightness})
});
});
var shutdownButton = document.getElementById("shutdown-btn");
shutdownButton.addEventListener("click", () => {