mirror of https://github.com/VERT-sh/VERT.git
chore: remove unused dropping code
This commit is contained in:
parent
5cc9056c33
commit
5b07832267
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue