aboutsummaryrefslogtreecommitdiff
path: root/src/components/status_content
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2020-07-07 12:14:58 +0000
committerShpuld Shpludson <shp@cock.li>2020-07-07 12:14:58 +0000
commitec26ff04ce541c3ba5a7f89d57cd04f74e79cfcc (patch)
tree7b85ca1b8001d4aedb4a49291c1c5425f30853b0 /src/components/status_content
parentbbb977a04475a445fc0588af86b3c5eb33ec0577 (diff)
parent0fe5d4cf1074fe6c4a811728de187fccadf1cac3 (diff)
Merge branch 'xenofem/pleroma-fe-rebased-image-description-authoring' into 'develop'
media description authoring v3 See merge request pleroma/pleroma-fe!1161
Diffstat (limited to 'src/components/status_content')
-rw-r--r--src/components/status_content/status_content.js11
-rw-r--r--src/components/status_content/status_content.vue12
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"
/>