diff --git a/src/components/FileTable.vue b/src/components/FileTable.vue index c7ebe92..e79b5d7 100644 --- a/src/components/FileTable.vue +++ b/src/components/FileTable.vue @@ -443,28 +443,15 @@ export default { this.isDroppable = true; }, async moveListOfFiles(files) { - let listOfFolder = []; for (const file of files.children) { this.transferProgress += 100 / files.children.length; if (file.isDirectory) { - //just create the folder - await this.createFolder(file, file.parentPath + '/'); - let parentPath = file.parentPath; - if(parentPath === ''){ - listOfFolder.push(file.name); - } - else{ - listOfFolder.push(file.parentPath + '/' + file.name); - } + await this.moveFilesOfFolder(file, file.parentPath + '/'); } else { if (file.content && typeof file.content.arrayBuffer === 'function') { file.content = await file.content.arrayBuffer(); } - if (listOfFolder.includes(file.parentPath)) { - await this.moveFileToTarget(file, file.parentPath + '/', file.name); - } else { - await this.moveFileToTarget(file, ''); - } + await this.moveFileToTarget(file, ''); } } }, diff --git a/src/components/WebContentViewer.vue b/src/components/WebContentViewer.vue index 0a40e22..966ffa0 100644 --- a/src/components/WebContentViewer.vue +++ b/src/components/WebContentViewer.vue @@ -240,18 +240,8 @@ export default { handleCheckboxChange(file, event) { if (event.target.checked) { this.cocheFile(file); - - // Si c'est un dossier, cocher récursivement tous les fichiers enfants - if (file.isDirectory && file.children) { - this.cocheFilesRecursively(file.children); - } } else { this.decocheFile(file); - - // Si c'est un dossier, décocher récursivement tous les fichiers enfants - if (file.isDirectory && file.children) { - this.decocheFilesRecursively(file.children); - } } }, getFullPath(file) { @@ -269,22 +259,6 @@ export default { decocheFile(file) { this.cochedFiles = this.cochedFiles.filter(f => this.getFullPath(f) !== this.getFullPath(file)); }, - cocheFilesRecursively(files) { - files.forEach(file => { - this.cocheFile(file); - if (file.isDirectory && file.children) { - this.cocheFilesRecursively(file.children); - } - }); - }, - decocheFilesRecursively(files) { - files.forEach(file => { - this.decocheFile(file); - if (file.isDirectory && file.children) { - this.decocheFilesRecursively(file.children); - } - }); - }, isChecked(file) { return this.cochedFiles.some(f => this.getFullPath(f) === this.getFullPath(file)); },