Include non-gallery attachments and distinguish between images and videos

This commit is contained in:
xenofem 2020-02-08 16:01:01 -05:00
parent 36e19128bf
commit e36c39be19
2 changed files with 15 additions and 1 deletions

View File

@ -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
},

View File

@ -280,9 +280,13 @@
>
{{ $t("general.show_more") }}
<span
v-if="galleryAttachments.length > 0"
v-if="hasImageAttachments"
class="icon-picture"
/>
<span
v-if="hasVideoAttachments"
class="icon-video"
/>
<span
v-if="status.card"
class="icon-link"