From 04fa1f0b2d1a92b1c653cd55f51ee7e1434b2bd7 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 7 Jun 2021 18:39:51 +0300 Subject: some docs, added richcontent to usernames in status, updated stillImage to allow scale of "gif" label --- src/components/still-image/still-image.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/components/still-image/still-image.vue') diff --git a/src/components/still-image/still-image.vue b/src/components/still-image/still-image.vue index d3eb5925..a3610b51 100644 --- a/src/components/still-image/still-image.vue +++ b/src/components/still-image/still-image.vue @@ -30,7 +30,7 @@ position: relative; line-height: 0; overflow: hidden; - display: flex; + display: inline-flex; align-items: center; canvas { @@ -53,6 +53,7 @@ &.animated { &::before { + zoom: var(--_still_image-label-scale, 1); content: 'gif'; position: absolute; line-height: 10px; -- cgit v1.2.3-70-g09d2 From 6199788f28a2665388427f6e7737f15cebd5102d Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 7 Jun 2021 20:44:32 +0300 Subject: fix tall emojis being cropped --- src/components/still-image/still-image.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/still-image/still-image.vue') diff --git a/src/components/still-image/still-image.vue b/src/components/still-image/still-image.vue index a3610b51..0623b42e 100644 --- a/src/components/still-image/still-image.vue +++ b/src/components/still-image/still-image.vue @@ -47,7 +47,7 @@ img { width: 100%; - min-height: 100%; + height: 100%; object-fit: contain; } -- cgit v1.2.3-70-g09d2 From a9830ff4913a56a3ff097505a4e65bb61117b4d5 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 3 Feb 2022 22:50:32 +0200 Subject: support width/height img attributes --- src/components/still-image/still-image.js | 11 ++++++++++- src/components/still-image/still-image.vue | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/components/still-image/still-image.vue') 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: { diff --git a/src/components/still-image/still-image.vue b/src/components/still-image/still-image.vue index 0623b42e..cca75fcb 100644 --- a/src/components/still-image/still-image.vue +++ b/src/components/still-image/still-image.vue @@ -2,6 +2,7 @@