Don't reload when canceling or resetting

pull/264/head
ElementalAlchemist 3 years ago committed by Mike Lang
parent 1ff1bcf0ab
commit ac79206ba0

@ -986,10 +986,10 @@ async function cancelVideoUpload() {
}); });
if (response.ok) { if (response.ok) {
responseElem.innerText = "Row has been cancelled. Reloading..."; responseElem.innerText = "Row has been cancelled.";
setTimeout(() => { setTimeout(() => {
window.location.reload(); responseElem.innerText = "";
}, 1000); }, 2000);
} else { } else {
responseElem.innerText = `${response.statusText}: ${await response.text()}`; responseElem.innerText = `${response.statusText}: ${await response.text()}`;
} }
@ -1014,10 +1014,14 @@ async function resetVideoRow() {
}); });
if (response.ok) { if (response.ok) {
responseElem.innerText = "Row has been reset. Reloading..."; responseElem.innerText = "Row has been reset.";
const forceResetConfirmationContainer = document.getElementById(
"data-correction-force-reset-confirm"
);
forceResetConfirmationContainer.classList.add("hidden");
setTimeout(() => { setTimeout(() => {
window.location.reload(); responseElem.innerText = "";
}, 1000); }, 2000);
} else { } else {
responseElem.innerText = `${response.statusText}: ${await response.text()}`; responseElem.innerText = `${response.statusText}: ${await response.text()}`;
} }

Loading…
Cancel
Save