diff --git a/thingizip/src/components/download.svelte b/thingizip/src/components/download.svelte
index 06aebbe..568adbb 100644
--- a/thingizip/src/components/download.svelte
+++ b/thingizip/src/components/download.svelte
@@ -2,7 +2,10 @@
import { downloadFiles, downloadAll } from '../utils/download';
let isDownloadingFiles = false;
+ let isFileDownloadError = false;
+
let isDownloadingAll = false;
+ let isDownloadAllError = false;
async function downloadAllFiles() {
isDownloadingFiles = true;
@@ -15,6 +18,11 @@
})
.catch(() => {
isDownloadingFiles = false;
+
+ isFileDownloadError = true;
+ setTimeout(function(){
+ isFileDownloadError = false;
+ }, 2500);
});
}
@@ -29,11 +37,16 @@
})
.catch(() => {
isDownloadingAll = false;
+
+ isDownloadAllError = true;
+ setTimeout(function(){
+ isDownloadAllError = false;
+ }, 2500);
});
}
-{#if isDownloadingFiles}
+{#if isDownloadingFiles && !isFileDownloadError}
+{:else if isFileDownloadError}
+
{:else}