1
0
mirror of https://git.pleroma.social/sjw/pleroma-fe.git synced 2024-12-23 20:25:05 +01:00

Merge branch 'feature-collapsed-media-indicator' into 'develop'

Indicate whether collapsed statuses contain gallery media or link preview cards

Closes #767

See merge request pleroma/pleroma-fe!1056
This commit is contained in:
Shpuld Shpludson 2020-02-10 14:50:42 +00:00
commit 6be6241767
3 changed files with 32 additions and 2 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

@ -277,7 +277,21 @@
href="#"
class="cw-status-hider"
@click.prevent="toggleShowMore"
>{{ $t("general.show_more") }}</a>
>
{{ $t("general.show_more") }}
<span
v-if="hasImageAttachments"
class="icon-picture"
/>
<span
v-if="hasVideoAttachments"
class="icon-video"
/>
<span
v-if="status.card"
class="icon-link"
/>
</a>
<a
v-if="showingMore"
href="#"

View File

@ -339,6 +339,12 @@
"css": "arrow-curved",
"code": 59426,
"src": "iconic"
},
{
"uid": "0ddd3e8201ccc7d41f7b7c9d27eca6c1",
"css": "link",
"code": 59427,
"src": "fontawesome"
}
]
}
}