| 366 | moveDirectoryOrFileModal.value = null; |
| 367 | } |
| 368 | function onClickDownloadDirectory(parentPath, name) { |
| 369 | const downloadUrl = `/api/files/download-directory?parentPath=${encodeURIComponent(parentPath)}&name=${encodeURIComponent(name)}`; |
| 370 | const link = document.createElement('a'); |
| 371 | link.href = downloadUrl; |
| 372 | link.download = `${name}.zip`; |
| 373 | document.body.appendChild(link); |
| 374 | link.click(); |
| 375 | document.body.removeChild(link); |
| 376 | } |
| 377 | async function onClickDeleteDirectory(parentPath, name, isBulkDeleting = false) { |
| 378 | if (isBulkDeleting || confirm('Are you sure you want to delete this directory?')) { |
| 379 | if (!isBulkDeleting && isDeleting.value) { |