diff --git a/src/lib/components/layout/Gradients.svelte b/src/lib/components/layout/Gradients.svelte index c62e77b..2adefcf 100644 --- a/src/lib/components/layout/Gradients.svelte +++ b/src/lib/components/layout/Gradients.svelte @@ -4,12 +4,16 @@ import VertVBig from "$lib/assets/vert-bg.svg?component"; import { files, gradientColor, showGradient } from "$lib/store/index.svelte"; import { quintOut } from "svelte/easing"; - import { fade } from "svelte/transition"; + import { fade } from "$lib/animation"; {#if page.url.pathname === "/"}
{:else if page.url.pathname === "/convert" && $showGradient} -
+ {#key $gradientColor} +
+ {/key} {:else if page.url.pathname === "/convert" && files.files.length === 1 && files.files[0].blobUrl}
{:else if page.url.pathname === "/about"}
{/if} \ No newline at end of file diff --git a/src/routes/convert/+page.svelte b/src/routes/convert/+page.svelte index 29d9d90..345aa93 100644 --- a/src/routes/convert/+page.svelte +++ b/src/routes/convert/+page.svelte @@ -27,12 +27,6 @@ } from "lucide-svelte"; $effect(() => { - if (files.files.length === 1 && files.files[0].blobUrl) { - showGradient.set(false); - } else { - showGradient.set(true); - } - // Set gradient color depending on the file types // TODO: if more file types added, add a "fileType" property to the file object const allAudio = files.files.every( @@ -47,6 +41,12 @@ (file) => file.converter?.name === "vertd", ); + if (files.files.length === 1 && files.files[0].blobUrl && !allVideos) { + showGradient.set(false); + } else { + showGradient.set(true); + } + if ( files.files.length === 0 || (!allAudio && !allImages && !allVideos)