add fetching for emoji reactions, draft design

This commit is contained in:
Shpuld Shpuldson 2019-11-15 08:39:21 +02:00
parent 1f42283b8d
commit d007502629
6 changed files with 56 additions and 1 deletions

View file

@ -149,6 +149,7 @@ const conversation = {
if (!id) return
this.highlight = id
this.$store.dispatch('fetchFavsAndRepeats', id)
this.$store.dispatch('fetchEmojiReactions', id)
},
getHighlight () {
return this.isExpanded ? this.highlight : null

View file

@ -278,6 +278,12 @@ const Status = {
hidePostStats () {
return this.mergedConfig.hidePostStats
},
emojiReactions () {
return {
'🤔': [{ 'id': 'xyz..' }, { 'id': 'zyx...' }],
'🐻': [{ 'id': 'abc...' }]
}
},
...mapGetters(['mergedConfig'])
},
components: {

View file

@ -354,6 +354,17 @@
</div>
</transition>
<div class="emoji-reactions">
<button
class="emoji-reaction btn btn-default"
v-for="(users, emoji) in emojiReactions"
:key="emoji"
>
<span>{{users.length}}</span>
<span>{{emoji}}</span>
</button>
</div>
<div
v-if="!noHeading && !isPreview"
class="status-actions media-body"
@ -771,6 +782,23 @@ $status-margin: 0.75em;
}
}
.emoji-reactions {
display: flex;
margin-top: 0.75em;
}
.emoji-reaction {
padding: 0 0.5em;
margin-right: 0.5em;
display: flex;
align-items: center;
justify-content: center;
:first-child {
margin-right: 0.25em;
}
}
.button-icon.icon-reply {
&:not(.button-icon-disabled):hover,
&.button-icon-active {