Skip to content

armgit / VERT

Public Imported from GitHub
0

The next-generation file converter. Open source, fully local* and free forever.

chore: remove unused dropping code

JovannMC5b0783226708
diff --git a/src/lib/components/functional/Uploader.svelte b/src/lib/components/functional/Uploader.svelte
index 7ccb42b..97efef8 100644
--- a/src/lib/components/functional/Uploader.svelte
+++ b/src/lib/components/functional/Uploader.svelte
@@ -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"
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 41a661c..b0dccb3 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -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"