diff options
Diffstat (limited to 'src/components/attachment')
| -rw-r--r-- | src/components/attachment/attachment.js | 8 | ||||
| -rw-r--r-- | src/components/attachment/attachment.vue | 5 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index ccf26b79..de551611 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -23,12 +23,8 @@ const Attachment = { hidden () { return this.nsfw && this.hideNsfwLocal && !this.showHidden }, - autoHeight () { - if (this.type === 'image' && this.nsfw) { - return { - 'min-height': '109px' - } - } + isEmpty () { + return this.type === 'html' && !this.attachment.oembed } }, methods: { diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index d4985732..954c46b4 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -1,5 +1,5 @@ <template> - <div class="attachment base03-border" :class="{[type]: true, loading}" :style="autoHeight"> + <div class="attachment base03-border" :class="{[type]: true, loading}" v-show="!isEmpty"> <a class="image-attachment" v-if="hidden" @click.prevent="toggleHidden()"> <img :key="nsfwImage" :src="nsfwImage"/> </a> @@ -50,7 +50,8 @@ } &.html { - flex-basis: 100%; + flex-basis: 90%; + width: 100%; display: flex; } |
