From 500c1c76ba1994eb1f4dbc508533f5ed48dd7fb8 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Sat, 13 Mar 2021 20:28:06 +0100 Subject: [PATCH] D & D CSV files --- packages/web/package.json | 1 + packages/web/src/Screen.svelte | 16 +++- .../impexp/ImportExportConfigurator.svelte | 90 ++++++++++++++++++- .../web/src/modals/ImportExportModal.svelte | 2 +- packages/web/src/stores.ts | 1 + .../web/src/utility/dragDropFileTarget.ts | 86 ++++++++++++++++++ packages/web/src/utility/openElectronFile.ts | 47 ++++++++++ packages/web/src/utility/uploadFiles.ts | 78 ++++++++++++++++ yarn.lock | 9 +- 9 files changed, 322 insertions(+), 8 deletions(-) create mode 100644 packages/web/src/utility/dragDropFileTarget.ts create mode 100644 packages/web/src/utility/openElectronFile.ts create mode 100644 packages/web/src/utility/uploadFiles.ts diff --git a/packages/web/package.json b/packages/web/package.json index 2ab91594..32b835c7 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -37,6 +37,7 @@ }, "dependencies": { "@mdi/font": "^5.9.55", + "file-selector": "^0.2.4", "sirv-cli": "^1.0.0", "svelte-select": "^3.17.0" } diff --git a/packages/web/src/Screen.svelte b/packages/web/src/Screen.svelte index 0cf0ba58..85ab285f 100644 --- a/packages/web/src/Screen.svelte +++ b/packages/web/src/Screen.svelte @@ -1,7 +1,14 @@ -
+
@@ -50,7 +58,9 @@ {/if} - + {#if $isFileDragActive} + + {/if}