Skip to content

armgit / VERT

Public Imported from GitHub
0

The next-generation file converter. Open source, fully local* and free forever.

fix: dl disabling

not-nullptr7fad1fd0bd40
diff --git a/src/app.css b/src/app.css
index c89d1f4..1bc98ab 100644
--- a/src/app.css
+++ b/src/app.css
@@ -31,6 +31,9 @@ body {
}
.btn {
- @apply font-display flex items-center justify-center overflow-hidden relative cursor-pointer px-4 border-2 border-solid bg-background border-foreground-muted-alt rounded-xl p-2 focus:!outline-none hover:scale-105 transition-transform duration-200 active:scale-95;
+ @apply font-display flex items-center justify-center overflow-hidden relative cursor-pointer px-4 border-2 border-solid bg-background border-foreground-muted-alt rounded-xl p-2 focus:!outline-none hover:scale-105 active:scale-95 disabled:pointer-events-none disabled:opacity-50;
+ transition:
+ 200ms ease transform,
+ 200ms ease opacity;
}
}
diff --git a/src/routes/convert/+page.svelte b/src/routes/convert/+page.svelte
index c1842e5..85944f6 100644
--- a/src/routes/convert/+page.svelte
+++ b/src/routes/convert/+page.svelte
@@ -20,6 +20,8 @@
let converter = $derived(converters.find((c) => c.name === converterName))!;
+ let disabled = $derived(files.files.some((f) => !f.result));
+
onMount(() => {
finisheds.forEach((_, i) => {
const duration = 750 + i * 50 - 32;
@@ -197,7 +199,10 @@
? " All"
: ""}</button
>
- <button onclick={downloadAll} class="btn flex-grow"
+ <button
+ onclick={downloadAll}
+ class="btn flex-grow"
+ {disabled}
>Download{files.files.length > 1
? " All"
: ""}</button