aboutsummaryrefslogtreecommitdiff
path: root/src/components/emoji_reactions/emoji_reactions.js
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2023-05-23 08:24:56 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2023-05-23 08:24:56 +0000
commitb6cef856f917baca5114b76f6854f00f957b0eec (patch)
treeda3b376cfbd69b7d9c667422d419ea89b600e72a /src/components/emoji_reactions/emoji_reactions.js
parent1e597d8b1aea91ae5c299fa6d5f32fac48b60e88 (diff)
parentb82f2a3543b733eda9ce52d60d6b7aba60f787d0 (diff)
Merge branch 'tusooa/reaction-accessibility' into 'develop'
Reaction accessibility See merge request pleroma/pleroma-fe!1827
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 })
+ }
}
}
}