From 3062960a4b512435cbdd0a92a8e582de094289e7 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Mon, 7 Mar 2022 17:24:15 +0100 Subject: [PATCH] fix(front/file-uploader): properly disable forms when uploading files to avoid interrupting a file upload fixes #9 --- src/assets/views/file-uploader.svelte | 91 ++++++++++++--------------- 1 file changed, 41 insertions(+), 50 deletions(-) diff --git a/src/assets/views/file-uploader.svelte b/src/assets/views/file-uploader.svelte index ca1c34e..a112e81 100644 --- a/src/assets/views/file-uploader.svelte +++ b/src/assets/views/file-uploader.svelte @@ -66,34 +66,27 @@ } } - td, th { - padding: 4px; - } + td, th { + padding: 4px; + } } - .new-files { - h3 { + .new-files { + h3 { text-align: center; :global(.icon) { color: var(--success); } - } + } - hr { - margin: 24px; - border: 0; - border-top: 1px solid var(--on-subsurface); - opacity: 0.25; - } - } - - .upload-form-container.disabled { - :global(button) { - cursor: not-allowed; - opacity: 0.1; - } - } + hr { + margin: 24px; + border: 0; + border-top: 1px solid var(--on-subsurface); + opacity: 0.25; + } + } @@ -107,38 +100,36 @@

You are responsible for the files that you upload.

-
-
- + + - - {#if !neverExpire} - - {/if} + + {#if !neverExpire} + + {/if} - {#if !selectedFiles || selectedFiles.length <= 1} - - {#if !autogenUrl} - - {/if} - {:else} - + {#if !selectedFiles || selectedFiles.length <= 1} + + {#if !autogenUrl} + {/if} - -
+ {:else} + + {/if} + {#if uploading}
{/if}