filemanager: Integrate download and extract logic

This commit is contained in:
Johannes Zellner
2023-06-20 15:21:58 +02:00
parent 299e40c389
commit 5814793dc1
4 changed files with 21 additions and 5 deletions
+8
View File
@@ -62,6 +62,8 @@
:copy-handler="copyHandler"
:cut-handler="cutHandler"
:paste-handler="pasteHandler"
:download-handler="downloadHandler"
:extract-handler="extractHandler"
:new-file-handler="onNewFile"
:new-folder-handler="onNewFolder"
:upload-file-handler="onUploadFile"
@@ -348,6 +350,12 @@ export default {
this.clipboard = {};
await this.loadCwd();
},
async downloadHandler(file) {
await this.directoryModel.download(buildFilePath(this.cwd, file.name));
},
async extractHandler(file) {
await this.directoryModel.extract(buildFilePath(this.cwd, file.name));
},
async uploadHandler(targetDir, file, progressHandler) {
await this.directoryModel.upload(targetDir, file, progressHandler);
await this.loadCwd();