Aucun contenu à afficher
@@ -87,13 +98,15 @@ export default {
data() {
return {
zipContent: [],
- folderMap: {},
+ folderMap: {},
archiveUrl: '',
token: '',
ChevronRightIcon,
ChevronDownIcon,
isLoading: ref(false),
Loading,
+ zipName: '',
+ zipSize: 0,
};
},
props: {
@@ -146,7 +159,9 @@ export default {
try {
const response = await fetch(this.zipUrl);
const zipData = await response.blob();
+ this.zipName = this.zipUrl.split('/').pop();
const zip = await JSZip.loadAsync(zipData);
+ this.zipSize = zipData.size;
const files = [];
@@ -219,6 +234,14 @@ export default {
const currentState = this.folderMap[file.fullPath];
this.$set(this.folderMap, file.fullPath, !currentState);
},
+ async dragZip() {
+ try {
+ const zip = {name: this.zipName, url: this.zipUrl};
+ this.$emit('zip-upload', zip);
+ } catch (error) {
+ console.error('Erreur lors du drag du ZIP :', error);
+ }
+ },
async onDragStart(file) {
const getFilesFromFolder = (folder) => {
From 57f3bf4a05863e20d23effbc8f96b6e1ce830b0d Mon Sep 17 00:00:00 2001
From: GMrrc <143954951+GMrrc@users.noreply.github.com>
Date: Tue, 26 Nov 2024 14:35:33 +0100
Subject: [PATCH 2/5] zip transfer
---
src/App.vue | 2 +-
src/components/FileTable.vue | 154 ++++++++++++++++++++---------------
src/output.css | 8 --
3 files changed, 91 insertions(+), 73 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index b1148bc..197896f 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -30,7 +30,7 @@ export default {
data() {
return {
sharedFile: null,
- zipUrl: null,
+ zip: null,
};
},
methods: {
diff --git a/src/components/FileTable.vue b/src/components/FileTable.vue
index 4da6eed..2d0401e 100644
--- a/src/components/FileTable.vue
+++ b/src/components/FileTable.vue
@@ -1,4 +1,4 @@
-
+
@@ -56,7 +56,8 @@
+ ]" @drop.prevent="onDrop" @dragover.prevent="onDragOver" @dragenter.prevent
+ @dragleave.prevent="onDragLeave($event)">
-
+
-
+
@@ -128,9 +131,11 @@