add indication of upload error

This commit is contained in:
Niko Abeler 2024-05-09 11:02:41 +02:00
parent 4bdb920c71
commit 2a4b76ee03
2 changed files with 26 additions and 0 deletions

View File

@ -48,6 +48,10 @@ function addFileDrop(id) {
textArea.classList.remove("drop-file-process")
}).catch(err => {
console.error(err);
textArea.classList.add("drop-file-error")
setTimeout(() => {
textArea.classList.remove("drop-file-error")
}, 2000)
}).finally(() => {
textArea.classList.remove("drop-file-process")
})

View File

@ -50,3 +50,25 @@
border-color: #5391ff;
animation: border-pulsate 2s infinite;
}
@keyframes border-pulsate-error {
0% {
border-color: #ff3e3e;
}
50% {
border-color: rgba(0, 255, 255, 0);
}
100% {
border-color: #ff3e3e;
}
}
.drop-file-error {
border-style: solid;
border-width: 4px;
border-color: #ff3e3e;
animation: border-pulsate-error 1s 2;
}