From cefedd56cb7e6a1b1acf2b6801168d93221201db Mon Sep 17 00:00:00 2001 From: GMrrc <143954951+GMrrc@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:38:32 +0100 Subject: [PATCH] transfert cochedList --- src/components/FileTable.vue | 17 +++++++++++ src/components/WebContentViewer.vue | 47 +++++++++++++++++------------ 2 files changed, 45 insertions(+), 19 deletions(-) diff --git a/src/components/FileTable.vue b/src/components/FileTable.vue index a1662ff..1f27fe9 100644 --- a/src/components/FileTable.vue +++ b/src/components/FileTable.vue @@ -408,6 +408,11 @@ export default { this.isTransfering = true; const file = this.file; + if (file.isList) { + await this.moveListOfFiles(file); + return; + } + if (!file) return; if (file.isDirectory) { await this.moveFilesOfFolder(file, ''); @@ -437,6 +442,18 @@ export default { } this.isDroppable = true; }, + async moveListOfFiles(files) { + for (const file of files) { + if (file.isDirectory) { + await this.moveFilesOfFolder(file, ''); + } else { + if (file.content && typeof file.content.arrayBuffer === 'function') { + file.content = await file.content.arrayBuffer(); + } + await this.moveFileToTarget(file, ''); + } + } + }, async moveFilesOfFolder(folder, parentPath) { await this.createFolder(folder, parentPath + '/'); const checkChildrenInChildren = (folder) => { diff --git a/src/components/WebContentViewer.vue b/src/components/WebContentViewer.vue index 1e3b615..eb35bad 100644 --- a/src/components/WebContentViewer.vue +++ b/src/components/WebContentViewer.vue @@ -18,8 +18,7 @@
+ @change="handleCheckboxChange(file, $event)" :checked="isChecked(file)">
@@ -52,8 +51,7 @@
+ @change="handleCheckboxChange(file, $event)" :checked="isChecked(file)">