now instead of sending status in two places, i'm

just making the client ask for status
This commit is contained in:
Karma Riuk
2025-05-18 23:00:20 +02:00
parent 2e497d75fa
commit 9e90923dd3
2 changed files with 6 additions and 10 deletions

View File

@ -100,8 +100,12 @@ document.getElementById("upload-btn").onclick = async () => {
commentResultsContainer.classList.add("hidden");
refinementResultsContainer.classList.add("hidden");
uploadStatusEl.classList.remove("hidden");
uploadStatusEl.style.color = "green";
uploadStatusEl.textContent = json["id"];
uuid.value = json["id"];
document.getElementById("request-status").click();
};
[...document.getElementsByClassName("download-results")].forEach((e) => {
@ -178,5 +182,7 @@ document.getElementById("request-status").onclick = async () => {
if (json.type == "comment") populateCommentTable(json.results);
else if (json.type == "comment") populateRefinementTable(json.results);
else console.error(`Unknown type ${data.type}`);
} else if (json.status == "waiting") {
statusStatusEl.textContent = `Currently waiting, position in queue ${json.queue_position}`;
}
};