mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
- spotlight mobile fix with opening image
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
<!--Desktop preview-->
|
||||
<div
|
||||
v-if="!$isMobile() && (isAudio || isImage || isVideo || isPDF)"
|
||||
v-if="(!$isMobile() || fastPreview) && (isAudio || isImage || isVideo || isPDF)"
|
||||
class="flex h-full w-full items-center justify-center"
|
||||
>
|
||||
<!--Show PDF-->
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<!--Mobile Preview-->
|
||||
<div
|
||||
v-if="$isMobile() && (isAudio || isImage || isVideo || isPDF)"
|
||||
v-if="($isMobile() && !fastPreview) && (isAudio || isImage || isVideo || isPDF)"
|
||||
@scroll="checkGroupInView"
|
||||
id="group-box"
|
||||
ref="scrollBox"
|
||||
@@ -170,8 +170,6 @@ export default {
|
||||
events.$on('file-preview:next', () => this.next())
|
||||
events.$on('file-preview:prev', () => this.prev())
|
||||
|
||||
this.getFilesForView()
|
||||
|
||||
events.$on('file:deleted', id => {
|
||||
this.files = this.files.filter(item => item.data.id !== id)
|
||||
|
||||
@@ -181,6 +179,10 @@ export default {
|
||||
this.$store.commit('CLIPBOARD_REPLACE', this.currentFile)
|
||||
}
|
||||
})
|
||||
|
||||
if (! this.fastPreview) {
|
||||
this.getFilesForView()
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
events.$off('file:deleted')
|
||||
|
||||
@@ -219,9 +219,6 @@ export default {
|
||||
}, 300),
|
||||
},
|
||||
created() {
|
||||
// Set item name to own component variable
|
||||
this.itemName = this.entry.data.attributes.name
|
||||
|
||||
// Change item name
|
||||
events.$on('change:name', (item) => {
|
||||
if (this.entry.data.id === item.id) {
|
||||
@@ -237,7 +234,12 @@ export default {
|
||||
}
|
||||
})
|
||||
|
||||
this.getImageSrc()
|
||||
// Set item name to own component variable
|
||||
this.itemName = this.entry.data.attributes.name
|
||||
|
||||
if (this.entry.data.type === 'image') {
|
||||
this.getImageSrc()
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user