From 36e19128bf958559437144b26a3e71f30c9b3377 Mon Sep 17 00:00:00 2001 From: xenofem Date: Sat, 8 Feb 2020 13:15:09 -0500 Subject: [PATCH 1/2] Indicate whether collapsed statuses contain gallery media or link preview cards --- src/components/status/status.vue | 12 +++++++++++- static/fontello.json | 8 +++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/components/status/status.vue b/src/components/status/status.vue index d5739304..b9e3fa1d 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -277,7 +277,17 @@ href="#" class="cw-status-hider" @click.prevent="toggleShowMore" - >{{ $t("general.show_more") }} + > + {{ $t("general.show_more") }} + + + Date: Sat, 8 Feb 2020 16:01:01 -0500 Subject: [PATCH 2/2] Include non-gallery attachments and distinguish between images and videos --- src/components/status/status.js | 10 ++++++++++ src/components/status/status.vue | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/status/status.js b/src/components/status/status.js index 81b57667..fc5956ec 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -256,6 +256,16 @@ const Status = { file => !fileType.fileMatchesSomeType(this.galleryTypes, file) ) }, + hasImageAttachments () { + return this.status.attachments.some( + file => fileType.fileType(file.mimetype) === 'image' + ) + }, + hasVideoAttachments () { + return this.status.attachments.some( + file => fileType.fileType(file.mimetype) === 'video' + ) + }, maxThumbnails () { return this.mergedConfig.maxThumbnails }, diff --git a/src/components/status/status.vue b/src/components/status/status.vue index b9e3fa1d..0a82dcbe 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -280,9 +280,13 @@ > {{ $t("general.show_more") }} +