mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
- image thumbnail fix in s3
- svg thumbnail fix
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<div class="flex h-full w-full items-center justify-center">
|
||||
<Audio v-if="isAudio" :file="currentFile" />
|
||||
<Video v-if="isVideo" :file="currentFile" class="mx-auto max-h-full max-w-[1080px] self-center" />
|
||||
<ImageFile v-if="isImage" :file="currentFile" class="mx-auto max-h-[100%] max-w-[100%] self-center" />
|
||||
<ImageFile v-if="isImage" :file="currentFile" class="mx-auto max-h-[100%] max-w-[100%] self-center" :class="{'file-shadow': !$isMobile()}" id="printable-file" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<template>
|
||||
<img id="printable-file" class="file" :class="{'file-shadow': !$isMobile()}" :src="src" @error="replaceByOriginal" />
|
||||
<img class="file" :src="src" @error="replaceByOriginal" alt="" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ImageFile',
|
||||
props: ['file'],
|
||||
props: [
|
||||
'file'
|
||||
],
|
||||
watch: {
|
||||
'file': function () {
|
||||
this.getSrc()
|
||||
@@ -21,9 +23,9 @@ export default {
|
||||
this.src = this.file.data.attributes.file_url
|
||||
},
|
||||
getSrc() {
|
||||
let windowWidth = window.innerWidth
|
||||
|
||||
if (windowWidth > 1280) {
|
||||
if (this.file.data.attributes.mimetype === 'svg') {
|
||||
this.src = this.file.data.attributes.file_url
|
||||
} else if (window.innerWidth > 1280) {
|
||||
this.src = this.file.data.attributes.thumbnail.xl
|
||||
} else {
|
||||
this.src = this.file.data.attributes.thumbnail.lg
|
||||
|
||||
Reference in New Issue
Block a user