aboutsummaryrefslogtreecommitdiff
path: root/src/components/attachment
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2018-01-29 10:47:26 +0300
committerHenry Jameson <me@hjkos.com>2018-03-12 01:30:27 +0300
commitb10787d23ca645932e89383ebb39402d1eb84700 (patch)
treed184ec36b908a707ebf6e4726b2c02d351044605 /src/components/attachment
parentcd3bf461dba72ddb04c4b1c3a4b736009b968cbe (diff)
first ver
Diffstat (limited to 'src/components/attachment')
-rw-r--r--src/components/attachment/attachment.js4
-rw-r--r--src/components/attachment/attachment.vue2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js
index 8a2a3826..cd72e571 100644
--- a/src/components/attachment/attachment.js
+++ b/src/components/attachment/attachment.js
@@ -1,3 +1,4 @@
+import StillImage from '../still-image/still-image.vue'
import nsfwImage from '../../assets/nsfw.png'
import fileTypeService from '../../services/file_type/file_type.service.js'
@@ -16,6 +17,9 @@ const Attachment = {
img: document.createElement('img')
}
},
+ components: {
+ StillImage
+ },
computed: {
type () {
return fileTypeService.fileType(this.attachment.mimetype)
diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue
index d6a51ffd..2810e205 100644
--- a/src/components/attachment/attachment.vue
+++ b/src/components/attachment/attachment.vue
@@ -8,7 +8,7 @@
</div>
<a v-if="type === 'image' && !hidden" class="image-attachment" :href="attachment.url" target="_blank">
- <img class="base03-border" referrerpolicy="no-referrer" :src="attachment.large_thumb_url || attachment.url"/>
+ <StillImage class="base03-border" referrerpolicy="no-referrer" :mimetype="attachment.mimetype" :src="attachment.large_thumb_url || attachment.url"/>
</a>
<video class="base03" v-if="type === 'video' && !hidden" :src="attachment.url" controls loop></video>