made the loading animation prettier

This commit is contained in:
Marcel Gansfusz
2025-10-22 21:11:40 +02:00
parent 0c96d04326
commit 26ea274023
3 changed files with 166 additions and 108 deletions

View File

@@ -287,7 +287,7 @@ async function submitForm(formData) {
const updateEventSource = new EventSource(
"http://127.0.0.1:8000/get_censor_status/" + doc.fID,
);
modal.style.display = "block";
modal.style.display = "flex";
// console.log("http://127.0.0.1:8000/get_censor_status/" + doc.fID);
updateEventSource.addEventListener("censorUpdate", function(eve) {
console.log(eve.data);
@@ -384,11 +384,11 @@ function initListeners() {
}
function initLoading() {
modal = document.querySelector("#loading");
close_loading = document.querySelector(".close");
// close_loading = document.querySelector(".close");
upload_status = document.querySelector("#upload_status");
close_loading.addEventListener("click", function() {
modal.style.display = "none";
});
// close_loading.addEventListener("click", function() {
// modal.style.display = "none";
// });
}
const startPdf = () => {
// doc = new PDFDocument(

View File

@@ -259,18 +259,23 @@ input[type="file"]::file-selector-button {
/* Fallback color */
background-color: rgba(0, 0, 0, 0.4);
/* Black w/ opacity */
justify-content: center;
}
/* Modal Content/Box */
.loading-content {
background-color: #4f5977;
margin: 15% auto;
margin: auto;
/* 15% from the top and centered */
padding: 20px;
/* border: 1px solid #888; */
/* width: 80%; */
border-radius: 15px;
display: flex;
flex-direction: column;
/* Could be more or less, depending on screen size */
align-items: center;
text-align: center;
}
/* The Close Button */
@@ -294,6 +299,7 @@ input[type="file"]::file-selector-button {
}
.loader {
margin: auto;
border: 16px solid #f3f3f3;
/* Light grey */
border-top: 16px solid #3498db;