From 3f09532e24c81f22d246d64b4dd7e967f09b4606 Mon Sep 17 00:00:00 2001 From: Fornax Date: Fri, 26 Nov 2021 20:20:49 +0100 Subject: [PATCH] Separate file downloader into component --- svelte/src/file_viewer/Downloader.svelte | 117 +++++++++++++++++++++++ svelte/src/file_viewer/FileViewer.svelte | 112 ++-------------------- 2 files changed, 126 insertions(+), 103 deletions(-) create mode 100644 svelte/src/file_viewer/Downloader.svelte diff --git a/svelte/src/file_viewer/Downloader.svelte b/svelte/src/file_viewer/Downloader.svelte new file mode 100644 index 0000000..ee09034 --- /dev/null +++ b/svelte/src/file_viewer/Downloader.svelte @@ -0,0 +1,117 @@ + + + + {#if load_captcha_script} + + {/if} + + + + + {#if captcha_type === "rate_limit"} +

+ This file is using a suspicious amount of bandwidth relative to + its popularity. To continue downloading this file you will have + to prove that you're a human first. +

+ {:else if captcha_type === "malware"} +

+ According to our scanning systems this file may contain a virus. + You can continue downloading this file at your own risk, but you + will have to prove that you're a human first. +

+ {/if} +
+
+
+ + diff --git a/svelte/src/file_viewer/FileViewer.svelte b/svelte/src/file_viewer/FileViewer.svelte index b7a0d8d..c1a3f4b 100644 --- a/svelte/src/file_viewer/FileViewer.svelte +++ b/svelte/src/file_viewer/FileViewer.svelte @@ -1,12 +1,12 @@