diff options
| author | Henry Jameson <me@hjkos.com> | 2023-05-23 22:24:04 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2023-05-23 22:24:04 +0300 |
| commit | b72af7d6ae287f86fab4e26c57fb995fdc82f84f (patch) | |
| tree | 4e550ab9b298e4d457afcbde5e4b8b9a4d00d0d7 /src/components/emoji_reactions/emoji_reactions.js | |
| parent | 99f85069b8a3bc44c3c0a5c6cac35dbfbd740dd5 (diff) | |
| parent | 4bf085b8feb81ad52bad6cb8979786df22baba9e (diff) | |
Merge remote-tracking branch 'origin/develop' into improve_settings_reusability
Diffstat (limited to 'src/components/emoji_reactions/emoji_reactions.js')
| -rw-r--r-- | src/components/emoji_reactions/emoji_reactions.js | 26 |
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 }) + } } } } |
