From f54b87140c4cf62b925d422853691616a28ad4c1 Mon Sep 17 00:00:00 2001 From: Dennis Postma Date: Sat, 5 Apr 2025 23:43:47 +0200 Subject: [PATCH] Allow for JSON import/export --- src/App.vue | 155 ++++++++++++++++++++++++++++++++ src/components/FileUploader.vue | 11 +-- 2 files changed, 161 insertions(+), 5 deletions(-) diff --git a/src/App.vue b/src/App.vue index bf3cc40..d730fda 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,7 +9,15 @@
+
+

Upload sprites

+ +
+
@@ -23,6 +31,11 @@ Download spritesheet + +
@@ -55,7 +56,7 @@ if (event.dataTransfer?.files && event.dataTransfer.files.length > 0) { const files = Array.from(event.dataTransfer.files).filter(file => { - return file.type.startsWith('image/'); + return file.type.startsWith('image/') || file.type === 'application/json' || file.name.endsWith('.json'); }); if (files.length > 0) {