fix conflicts, use file icon instead of link, add support for audio and file icon in cw'd posts

This commit is contained in:
Shpuld Shpuldson 2020-07-06 14:01:03 +03:00
commit 87b5f828d7
40 changed files with 455 additions and 63 deletions

View file

@ -99,15 +99,9 @@ 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 () {
console.log(this.status.attachments)
return this.status.attachments.map(file => fileType.fileType(file.mimetype))
},
maxThumbnails () {
return this.mergedConfig.maxThumbnails

View file

@ -55,13 +55,21 @@
>
{{ $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"