diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2022-02-20 15:11:52 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2022-02-20 15:11:52 +0000 |
| commit | 58d0f9678b749d1b2ef8aa7d6fb4a91da9cf947d (patch) | |
| tree | 6879bff1875d70c4eec0bf893e492e76ac0ff562 /src/components/still-image/still-image.js | |
| parent | ddee8bb686fb18baf5212089653a8b4e40feedd6 (diff) | |
| parent | 86e3aefdab3fa1314d4731eabcf03f8c9e418e41 (diff) | |
Merge branch 'fix-mentions-new-bugs' into 'develop'
Fix newfound bugs with rich mentions + user suggestions
See merge request pleroma/pleroma-fe!1430
Diffstat (limited to 'src/components/still-image/still-image.js')
| -rw-r--r-- | src/components/still-image/still-image.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/components/still-image/still-image.js b/src/components/still-image/still-image.js index 8044e994..d7abbcb5 100644 --- a/src/components/still-image/still-image.js +++ b/src/components/still-image/still-image.js @@ -5,7 +5,9 @@ const StillImage = { 'mimetype', 'imageLoadError', 'imageLoadHandler', - 'alt' + 'alt', + 'height', + 'width' ], data () { return { @@ -15,6 +17,13 @@ const StillImage = { computed: { animated () { return this.stopGifs && (this.mimetype === 'image/gif' || this.src.endsWith('.gif')) + }, + style () { + const appendPx = (str) => /\d$/.test(str) ? str + 'px' : str + return { + height: this.height ? appendPx(this.height) : null, + width: this.width ? appendPx(this.width) : null + } } }, methods: { |
