I completed the front-end portion of this last year. The back end still needs to be done.
Add a new mode called "countdown"
/countdown should be a POST endpoint that accepts two form parameters: "minutes" and "seconds"
Before starting a countdown, ensure the barmode is set to "countdown"
When in countdown mode, the phrase box should show how much time is left
The bar should also show the time remaining (For example, if the timer was set to 5:00 and one minute has passed, the Formbar should be 80% lit up)
Play a sound effect when the countdown is done
Once countdown mode is working, update the control panel:
Replace this section
if (document.getElementById("countdown").checked) {
document.getElementById("playtime").checked = true;
alert("This feature is not available yet.");
//document.getElementById("countdownTime").classList.remove("hidden");
}
with this
if (document.getElementById("countdown").checked) {
request.open('GET', '/controlpanel?barmode=countdown');
request.send();
document.getElementById("countdownTime").classList.remove("hidden");
}
I completed the front-end portion of this last year. The back end still needs to be done.
with this