fix arrow function when is just one file in MediaPreview

This commit is contained in:
Miloš Holba
2020-08-22 17:55:03 +02:00
parent 4be77c07ac
commit aac0aa755f
3 changed files with 11 additions and 31 deletions
@@ -21,7 +21,7 @@
id="fast-preview-menu"
class="fast-menu-icon"
@click="menuOpen"
v-if="$checkPermission('master', 'editor')"
v-if="$checkPermission(['master', 'editor'])"
>
<more-horizontal-icon class="more-icon" size="14">
</more-horizontal-icon>
@@ -18,8 +18,7 @@
v-on:load="onLoaded"
/>
<div class="video-wrapper" v-if="fileInfoDetail.type === 'video' && currentFile.file_url">
<video
<video
:src="currentFile.file_url"
class="video"
controlsList="nodownload"
@@ -70,6 +69,7 @@ export default {
},
},
mounted() {
if(this.sliderFile.length > 1 ) {
events.$on('filePreviewAction:next', () => {
this.currentIndex += 1;
this.slideType = 'next'
@@ -84,6 +84,7 @@ export default {
this.currentIndex = this.sliderFile.length - 1;
}
});
}
},
created() {
this.filteredFiles();
@@ -111,9 +112,6 @@ export default {
this.sliderFile = [];
this.filteredFiles();
}
if(this.sliderFile.length == 0 ) {
events.$emit('fileFullPreview:hide');
}
},
data(newValue, oldValue) {
//MOVE ITEM HANDLING
@@ -239,8 +237,6 @@ export default {
max-height: 100%;
align-self: center;
box-shadow: 0 8px 40px rgba($text, 0.3);
}
}
}