split code to components, add arrow functions

This commit is contained in:
Miloš Holba
2020-08-15 17:41:46 +02:00
parent 8387f56048
commit ba315014fa
11 changed files with 1768 additions and 1451 deletions
@@ -136,6 +136,9 @@ export default {
isVideo() {
return this.data.type === "video";
},
isAudio() {
return this.data.type === "audio";
},
canEditName() {
return (
!this.$isMobile() &&
@@ -229,12 +232,12 @@ export default {
return;
},
goToItem() {
if (this.isImage || this.isVideo) {
if (this.isImage || this.isVideo || this.isAudio) {
// this.$openImageOnNewTab(this.data.file_url)
events.$emit("fileFullPreview:show");
}
if (this.isFile && !this.isPdf && !this.isVideo) {
if (this.isFile && !this.isPdf && !this.isVideo && !this.isAudio) {
this.$downloadFile(
this.data.file_url,
this.data.name + "." + this.data.mimetype