Merge branch 'fetags' into 'develop'

add tags to data and to status component

See merge request pleroma/pleroma-fe!801
This commit is contained in:
HJ 2019-05-20 21:02:29 +00:00
commit 0fc7cbfa24
3 changed files with 6 additions and 1 deletions

View file

@ -274,6 +274,9 @@ const Status = {
},
ownStatus () {
return this.status.user.id === this.$store.state.users.currentUser.id
},
tags () {
return this.status.tags.filter(tagObj => tagObj.hasOwnProperty('name')).map(tagObj => tagObj.name).join(' ')
}
},
components: {

View file

@ -32,7 +32,7 @@
</div>
</div>
<div :class="[userClass, { highlighted: userStyle, 'is-retweet': retweet && !inConversation }]" :style="[ userStyle ]" class="media status">
<div :class="[userClass, { highlighted: userStyle, 'is-retweet': retweet && !inConversation }]" :style="[ userStyle ]" class="media status" :data-tags="tags">
<div v-if="!noHeading" class="media-left">
<router-link :to="userProfileLink" @click.stop.prevent.capture.native="toggleUserExpanded">
<UserAvatar :compact="compact" :betterShadow="betterShadow" :user="status.user"/>

View file

@ -192,6 +192,8 @@ export const parseStatus = (data) => {
output.statusnet_html = addEmojis(data.content, data.emojis)
output.tags = data.tags
if (data.pleroma) {
const { pleroma } = data
output.text = pleroma.content ? data.pleroma.content['text/plain'] : data.content