diff --git a/web/static/editor.js b/web/static/editor.js index f3932e7..34dc902 100644 --- a/web/static/editor.js +++ b/web/static/editor.js @@ -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") }) diff --git a/web/static/style.css b/web/static/style.css index e036c76..9650694 100644 --- a/web/static/style.css +++ b/web/static/style.css @@ -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; +} \ No newline at end of file