From a58a6d3c357592f34007c67bbf7fdf740864212a Mon Sep 17 00:00:00 2001 From: tusooa Date: Sat, 14 Jan 2023 23:20:28 -0500 Subject: [PATCH] Fix notification attachment icon overflow --- src/components/attachment/attachment.js | 4 +++- src/components/attachment/attachment.scss | 7 ++++++- src/components/attachment/attachment.vue | 5 +++-- src/components/gallery/gallery.js | 1 + src/components/gallery/gallery.vue | 1 + src/components/status_content/status_content.vue | 1 + 6 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index 5dc5047556..6e14b24d74 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -36,6 +36,7 @@ library.add( const Attachment = { props: [ 'attachment', + 'compact', 'description', 'hideDescription', 'nsfw', @@ -71,7 +72,8 @@ const Attachment = { { '-loading': this.loading, '-nsfw-placeholder': this.hidden, - '-editable': this.edit !== undefined + '-editable': this.edit !== undefined, + '-compact': this.compact }, '-type-' + this.type, this.size && '-size-' + this.size, diff --git a/src/components/attachment/attachment.scss b/src/components/attachment/attachment.scss index b2dea98d50..966acc685b 100644 --- a/src/components/attachment/attachment.scss +++ b/src/components/attachment/attachment.scss @@ -102,7 +102,6 @@ padding-top: 0.5em; } - .play-icon { position: absolute; font-size: 64px; @@ -265,4 +264,10 @@ object-fit: cover; } } + + &.-compact { + .placeholder-container { + padding-bottom: 0.5em; + } + } } diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index 2a89886d7d..79f628061c 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -162,10 +162,11 @@ target="_blank" > -

+

{{ localDescription }}

diff --git a/src/components/gallery/gallery.js b/src/components/gallery/gallery.js index 4e1bda55fd..e86a3eeaf3 100644 --- a/src/components/gallery/gallery.js +++ b/src/components/gallery/gallery.js @@ -4,6 +4,7 @@ import { sumBy, set } from 'lodash' const Gallery = { props: [ 'attachments', + 'compact', 'limitRows', 'descriptions', 'limit', diff --git a/src/components/gallery/gallery.vue b/src/components/gallery/gallery.vue index ccf6e3e21c..bc18f5454e 100644 --- a/src/components/gallery/gallery.vue +++ b/src/components/gallery/gallery.vue @@ -20,6 +20,7 @@ v-for="(attachment, attachmentIndex) in row.items" :key="attachment.id" class="gallery-item" + :compact="compact" :nsfw="nsfw" :attachment="attachment" :size="size" diff --git a/src/components/status_content/status_content.vue b/src/components/status_content/status_content.vue index e2120f7a61..c0e5c0b9de 100644 --- a/src/components/status_content/status_content.vue +++ b/src/components/status_content/status_content.vue @@ -33,6 +33,7 @@