chore: remove unused dropping code

This commit is contained in:
JovannMC 2025-02-09 20:38:54 +03:00
parent 5cc9056c33
commit 5b07832267
No known key found for this signature in database
2 changed files with 2 additions and 20 deletions

View File

@ -13,17 +13,8 @@
const { class: classList }: Props = $props();
let dropping = $state(false);
let uploaderButton = $state<HTMLButtonElement>();
const dropFiles = (e: DragEvent) => {
e.preventDefault();
dropping = false;
const oldLength = files.files.length;
files.add(e.dataTransfer?.files);
if (oldLength !== files.files.length) goto("/convert");
};
const uploadFiles = async () => {
const input = document.createElement("input");
input.type = "file";
@ -68,14 +59,9 @@
</script>
<button
ondragenter={() => (dropping = true)}
ondragleave={() => (dropping = false)}
ondrop={dropFiles}
onclick={uploadFiles}
bind:this={uploaderButton}
class={clsx(`hover:scale-105 active:scale-100 duration-200 ${classList}`, {
"scale-105": dropping,
})}
class={clsx(`hover:scale-105 active:scale-100 duration-200 ${classList}`)}
>
<Panel
class="flex justify-center items-center w-full h-full flex-col pointer-events-none"

View File

@ -200,11 +200,7 @@
</div>
</div>
<div
class="grid grid-rows-1 grid-cols-1 h-full flex-grow z-50 {dropping
? 'pointer-events-none'
: ''}"
>
<div class="grid grid-rows-1 grid-cols-1 h-full flex-grow z-50">
{#key page.url.pathname}
<div
class="row-start-1 col-start-1"