Update to latest Lufi API

This commit is contained in:
Booteille 2024-11-13 18:25:02 +01:00
parent 38189ba1e8
commit 18074c03db
No known key found for this signature in database
GPG Key ID: 0AB6C6CA01272646
3 changed files with 14 additions and 13 deletions

View File

@ -419,7 +419,8 @@ const startUpload = (
});
})
)
);
)
.orElse((error) => console.error(error));
};
const handleFiles = (files = []) => {
@ -436,19 +437,10 @@ const handleFiles = (files = []) => {
document.getElementById("first-view").getAttribute("data-checked") ===
"data-checked";
const password = document.getElementById("file_pwd").value;
const resultsElement = document.getElementById("results");
if (window.fileList === undefined || window.fileList === null) {
window.fileList = filesArray; // Convert FileList to an array
window.fileList.forEach((file) => {
Materialize.toast(
i18n.enqueued.replace("XXX", escapeHtml(file.name)),
3000,
"teal accent-3"
);
});
window.nbFiles = window.fileList.length;
const resultsElement = document.getElementById("results");
if (resultsElement) {
resultsElement.style.display = "block";
}
@ -456,6 +448,15 @@ const handleFiles = (files = []) => {
window.fileList = window.fileList.concat(filesArray); // Concatenate new files
}
filesArray.forEach((file) => {
Materialize.toast(
i18n.enqueued.replace("XXX", escapeHtml(file.name)),
3000,
"teal accent-3"
);
});
window.nbFiles = window.fileList.length;
document.body.style.cursor = "default";
startUpload(

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long