aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2019-05-20 21:02:29 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2019-05-20 21:02:29 +0000
commit0fc7cbfa2462cfc025f6d218f02649693a71f677 (patch)
treed84e25b53ab48848b5d09875aee47e2b019d812a /src
parentb78ad8998dbba447796a62be945d6fdf2153506a (diff)
parent0f824ff311bd3b1b8a0126ad9d7a2885440d3762 (diff)
Merge branch 'fetags' into 'develop'
add tags to data and to status component See merge request pleroma/pleroma-fe!801
Diffstat (limited to 'src')
-rw-r--r--src/components/status/status.js3
-rw-r--r--src/components/status/status.vue2
-rw-r--r--src/services/entity_normalizer/entity_normalizer.service.js2
3 files changed, 6 insertions, 1 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 5b3d98c3..ea4c2b9d 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -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: {
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index aea5b78b..e1dd81ac 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -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"/>
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
index 8e413584..46ca7602 100644
--- a/src/services/entity_normalizer/entity_normalizer.service.js
+++ b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -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