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) 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 () { maxThumbnails () {
return this.mergedConfig.maxThumbnails return this.mergedConfig.maxThumbnails
}, },

View file

@ -277,7 +277,21 @@
href="#" href="#"
class="cw-status-hider" class="cw-status-hider"
@click.prevent="toggleShowMore" @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 <a
v-if="showingMore" v-if="showingMore"
href="#" href="#"

View file

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