diff options
| author | Shpuld Shpuldson <shpuld@shpposter.club> | 2019-11-15 08:39:21 +0200 |
|---|---|---|
| committer | Shpuld Shpuldson <shpuld@shpposter.club> | 2019-11-15 08:39:21 +0200 |
| commit | d0075026290c90d8406c7ac81413259a8ae58ec7 (patch) | |
| tree | 171b3a6ccf21bd88e78b5a8344b602b249b61077 /src/components | |
| parent | 1f42283b8dda0308480de6292995221e631c3989 (diff) | |
add fetching for emoji reactions, draft design
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/conversation/conversation.js | 1 | ||||
| -rw-r--r-- | src/components/status/status.js | 6 | ||||
| -rw-r--r-- | src/components/status/status.vue | 28 |
3 files changed, 35 insertions, 0 deletions
diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index 72ee9c39..715804ff 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -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 diff --git a/src/components/status/status.js b/src/components/status/status.js index 4fbd5ac3..8268e615 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -278,6 +278,12 @@ const Status = { hidePostStats () { return this.mergedConfig.hidePostStats }, + emojiReactions () { + return { + '🤔': [{ 'id': 'xyz..' }, { 'id': 'zyx...' }], + '🐻': [{ 'id': 'abc...' }] + } + }, ...mapGetters(['mergedConfig']) }, components: { diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 65778b2e..aae58a5e 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -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 { |
