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