aboutsummaryrefslogtreecommitdiff
path: root/src/components/still-image
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2018-02-03 20:32:13 +0300
committerHenry Jameson <me@hjkos.com>2018-03-12 01:30:27 +0300
commit55bc1a3414ac15b08554a43c00f7f631ca1d304a (patch)
treee18c50a9edfc0ba6960dd675bbd18243b7fd449a /src/components/still-image
parent3257991f4196cb6c2c77b3f81ec9f1850e243211 (diff)
fixed stretched spurdo in notifications, misc fixes, detect gif by extension for now
Diffstat (limited to 'src/components/still-image')
-rw-r--r--src/components/still-image/still-image.js16
-rw-r--r--src/components/still-image/still-image.vue1
2 files changed, 3 insertions, 14 deletions
diff --git a/src/components/still-image/still-image.js b/src/components/still-image/still-image.js
index e674b932..595652f2 100644
--- a/src/components/still-image/still-image.js
+++ b/src/components/still-image/still-image.js
@@ -12,14 +12,8 @@ const StillImage = {
}
},
computed: {
- animated: {
- get () {
- // If mimetype is gif then it is certainly animated, if it's undefined - we don't know YET
- return this.mimetype === 'image/gif' ? true : this.mimetype == null ? 'maybe' : false
- },
- set (val) {
- this.mimetype = val
- }
+ animated () {
+ return this.mimetype === 'image/gif' || this.src.endsWith('.gif')
}
},
methods: {
@@ -27,12 +21,6 @@ const StillImage = {
const canvas = this.$refs.canvas
if (!canvas) return
canvas.getContext('2d').drawImage(this.$refs.src, 1, 1, canvas.width, canvas.height)
- if (this.animated === 'maybe') {
- fetch(this.src).then((data) => {
- console.log(data)
- this.animated = data.type
- })
- }
}
}
}
diff --git a/src/components/still-image/still-image.vue b/src/components/still-image/still-image.vue
index cc426fff..b141cdaf 100644
--- a/src/components/still-image/still-image.vue
+++ b/src/components/still-image/still-image.vue
@@ -11,6 +11,7 @@
@import '../../_variables.scss';
.still-image {
position: relative;
+ line-height: 0;
&:hover canvas {
display: none;