diff --git a/files/usr/lib/lua/aredn/html.lua b/files/usr/lib/lua/aredn/html.lua index 55f272cc..6bbcca4b 100644 --- a/files/usr/lib/lua/aredn/html.lua +++ b/files/usr/lib/lua/aredn/html.lua @@ -194,14 +194,13 @@ function html.wait_for_reboot(delay, countdown, address) const div = document.getElementById("countdown"); if (div) { let t = Math.round(]] .. countdown .. [[ - (Date.now() - start) / 1000); - if (t <= 0) { - div.innerHTML = "" - } - else if (t == 1) { - div.innerHTML = t + " second"; - } - else { - div.innerHTML = t + " seconds"; + div.innerHTML = t <= 0 ? "..." : new Date(1000 * t).toISOString().substring(14, 19); + const cdp = document.getElementById("cdprogress"); + if (cdp) { + if (t < 0) + cdp.removeAttribute("value"); + else + cdp.setAttribute("value", cdp.getAttribute("max") - t); } } } @@ -257,7 +256,6 @@ function html.reboot() html.print("