Revert "feat: drop or click to *convert* (#52)"

This reverts commit 5b5901c4c7.
This commit is contained in:
not-nullptr 2025-04-13 12:56:06 +01:00
parent c6ccba97db
commit 7151a2dbce
1 changed files with 73 additions and 80 deletions

View File

@ -33,8 +33,9 @@
.join(",");
};
const uploadFiles = async () => {
if (!fileInput) return;
if(!fileInput) return
fileInput.click();
};
@ -46,6 +47,7 @@
if (oldLength !== files.files.length) goto("/convert");
};
onMount(() => {
const handler = (e: Event) => {
e.preventDefault();
@ -68,21 +70,12 @@
});
</script>
<input
bind:this={fileInput}
type="file"
multiple
class="hidden"
onchange={handleFileChange}
accept={acceptedTypes}
/>
<input bind:this={fileInput} type="file" multiple class="hidden" onchange={handleFileChange} accept={acceptedTypes}>
<button
onclick={uploadFiles}
bind:this={uploaderButton}
class={clsx(
`hover:scale-105 active:scale-100 ${$effects ? "" : "!scale-100"} duration-200 ${classList}`,
)}
class={clsx(`hover:scale-105 active:scale-100 ${$effects ? "" : "!scale-100"} duration-200 ${classList}`)}
>
<Panel
class="flex justify-center items-center w-full h-full flex-col pointer-events-none"
@ -93,7 +86,7 @@
<UploadIcon class="w-full h-full text-on-accent" />
</div>
<h2 class="text-center text-2xl font-semibold mt-4">
Drop or click to convert
Drop or click to upload
</h2>
</Panel>
</button>