diff options
| author | Henry Jameson <me@hjkos.com> | 2021-06-18 14:12:50 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2021-06-18 14:12:50 +0300 |
| commit | bfe31e20eaddaa9435c98962c53c35f4184ed5fe (patch) | |
| tree | 4a1c4db5520dd819b0ea68ede474cea4fab833b2 /src/components/attachment | |
| parent | 5c2744b426203ac0108fb6f736718b003c6f8cd9 (diff) | |
better compact attachments
Diffstat (limited to 'src/components/attachment')
| -rw-r--r-- | src/components/attachment/attachment.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index a80c5c2e..84656ffa 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -68,6 +68,7 @@ const Attachment = { '-nsfw-placeholder': this.hidden }, '-' + this.type, + '-' + this.size, `-${this.useContainFit ? 'contain' : 'cover'}-fit` ] }, @@ -102,10 +103,18 @@ const Attachment = { return (this.type === 'html' && !this.attachment.oembed) || this.type === 'unknown' }, useModal () { - const modalTypes = this.size === 'hide' ? ['image', 'video', 'audio'] - : this.mergedConfig.playVideosInModal - ? ['image', 'video'] - : ['image'] + let modalTypes = [] + switch (this.size) { + case 'hide': + case 'small': + modalTypes = ['image', 'video', 'audio', 'flash'] + break + default: + modalTypes = this.mergedConfig.playVideosInModal + ? ['image', 'video', 'flash'] + : ['image'] + break + } return modalTypes.includes(this.type) }, ...mapGetters(['mergedConfig']) |
