From 3fd05891e6a411224754bf068f6411ada87416ed Mon Sep 17 00:00:00 2001 From: wukko Date: Sun, 11 Aug 2024 18:30:42 +0600 Subject: [PATCH] web/remux: move drop area and open file button into own components --- web/src/components/misc/DragDropArea.svelte | 35 +++++++ web/src/components/misc/OpenFileButton.svelte | 29 ++++++ web/src/routes/remux/+page.svelte | 92 ++++--------------- 3 files changed, 82 insertions(+), 74 deletions(-) create mode 100644 web/src/components/misc/DragDropArea.svelte create mode 100644 web/src/components/misc/OpenFileButton.svelte diff --git a/web/src/components/misc/DragDropArea.svelte b/web/src/components/misc/DragDropArea.svelte new file mode 100644 index 00000000..61c11f8b --- /dev/null +++ b/web/src/components/misc/DragDropArea.svelte @@ -0,0 +1,35 @@ + + +
dropHandler(ev)} + on:dragover={(ev) => dragOverHandler(ev)} + on:dragend={() => { + draggedOver = false; + }} +> + +
diff --git a/web/src/components/misc/OpenFileButton.svelte b/web/src/components/misc/OpenFileButton.svelte new file mode 100644 index 00000000..f7421876 --- /dev/null +++ b/web/src/components/misc/OpenFileButton.svelte @@ -0,0 +1,29 @@ + + + diff --git a/web/src/routes/remux/+page.svelte b/web/src/routes/remux/+page.svelte index 45dc735d..36666d58 100644 --- a/web/src/routes/remux/+page.svelte +++ b/web/src/routes/remux/+page.svelte @@ -1,96 +1,40 @@ -
dropHandler(ev)} - on:dragover={(ev) => dragOverHandler(ev)} - on:dragend={() => { - draggedOver = false; - }} -> - -
+ + +