diff options
Diffstat (limited to 'src/components/status_content')
| -rw-r--r-- | src/components/status_content/status_content.js | 11 | ||||
| -rw-r--r-- | src/components/status_content/status_content.vue | 12 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js index 09ea3a20..67d9bd3c 100644 --- a/src/components/status_content/status_content.js +++ b/src/components/status_content/status_content.js @@ -99,15 +99,8 @@ const StatusContent = { 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' - ) + attachmentTypes () { + return this.status.attachments.map(file => fileType.fileType(file.mimetype)) }, maxThumbnails () { return this.mergedConfig.maxThumbnails diff --git a/src/components/status_content/status_content.vue b/src/components/status_content/status_content.vue index 40c28b5c..8068d8d2 100644 --- a/src/components/status_content/status_content.vue +++ b/src/components/status_content/status_content.vue @@ -55,14 +55,22 @@ > {{ $t("status.show_content") }} <span - v-if="hasImageAttachments" + v-if="attachmentTypes.includes('image')" class="icon-picture" /> <span - v-if="hasVideoAttachments" + v-if="attachmentTypes.includes('video')" class="icon-video" /> <span + v-if="attachmentTypes.includes('audio')" + class="icon-music" + /> + <span + v-if="attachmentTypes.includes('unknown')" + class="icon-doc" + /> + <span v-if="status.card" class="icon-link" /> |
