make progress visable and only show registration if enabled

This commit is contained in:
C4illin 2024-05-29 13:52:00 +02:00
parent b134b19876
commit ff176028d1
8 changed files with 42 additions and 20 deletions

View file

@ -13,9 +13,10 @@ window.downloadAll = function () {
};
const jobId = window.location.pathname.split("/").pop();
const main = document.querySelector("main");
const progressElem = document.querySelector("progress");
let progressElem = document.querySelector("progress");
const refreshData = () => {
// console.log("Refreshing data...", progressElem.value, progressElem.max);
if (progressElem.value !== progressElem.max) {
fetch(`/progress/${jobId}`, {
method: "POST",
@ -28,6 +29,8 @@ const refreshData = () => {
setTimeout(refreshData, 1000);
}
progressElem = document.querySelector("progress");
};
refreshData();