aboutsummaryrefslogtreecommitdiff
path: root/src/components/emoji_reactions/emoji_reactions.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/emoji_reactions/emoji_reactions.js')
-rw-r--r--src/components/emoji_reactions/emoji_reactions.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/components/emoji_reactions/emoji_reactions.js b/src/components/emoji_reactions/emoji_reactions.js
index bb11b840..b4936424 100644
--- a/src/components/emoji_reactions/emoji_reactions.js
+++ b/src/components/emoji_reactions/emoji_reactions.js
@@ -1,5 +1,17 @@
import UserAvatar from '../user_avatar/user_avatar.vue'
import UserListPopover from '../user_list_popover/user_list_popover.vue'
+import { library } from '@fortawesome/fontawesome-svg-core'
+import {
+ faPlus,
+ faMinus,
+ faCheck
+} from '@fortawesome/free-solid-svg-icons'
+
+library.add(
+ faPlus,
+ faMinus,
+ faCheck
+)
const EMOJI_REACTION_COUNT_CUTOFF = 12
@@ -33,6 +45,9 @@ const EmojiReactions = {
},
loggedIn () {
return !!this.$store.state.users.currentUser
+ },
+ remoteInteractionLink () {
+ return this.$store.getters.remoteInteractionLink({ statusId: this.status.id })
}
},
methods: {
@@ -62,6 +77,17 @@ const EmojiReactions = {
} else {
this.reactWith(emoji)
}
+ },
+ counterTriggerAttrs (reaction) {
+ return {
+ class: [
+ 'btn',
+ 'button-default',
+ 'emoji-reaction-count-button',
+ { '-picked-reaction': this.reactedWith(reaction.name) }
+ ],
+ 'aria-label': this.$tc('status.reaction_count_label', reaction.count, { num: reaction.count })
+ }
}
}
}