- pdf implementation

- file preview refactoring
This commit is contained in:
Peter Papp
2021-04-16 10:27:09 +02:00
parent 9105ce8bb1
commit b105c9fc8f
15 changed files with 2339 additions and 1514 deletions

View File

@@ -222,9 +222,9 @@ export default {
}
if (this.$isMobile()) {
if (this.isImage || this.isVideo || this.isAudio) {
if (this.isImage || this.isVideo || this.isAudio || this.isPdf) {
this.$store.commit('GET_FILEINFO_DETAIL', this.item)
events.$emit('fileFullPreview:show')
events.$emit('file-preview:show')
}
}
}
@@ -238,10 +238,10 @@ export default {
}
},
goToItem() {
if (this.isImage || this.isVideo || this.isAudio) {
events.$emit('fileFullPreview:show')
if (this.isImage || this.isVideo || this.isAudio || this.isPdf) {
events.$emit('file-preview:show')
} else if (this.isFile || !this.isFolder && !this.isPdf && !this.isVideo && !this.isAudio && !this.isImage) {
} else if (this.isFile || !this.isFolder && !this.isVideo && !this.isAudio && !this.isImage) {
this.$downloadFile(this.item.file_url, this.item.name + '.' + this.item.mimetype)
} else if (this.isFolder) {