add 'toggled' to picked react emoji

This commit is contained in:
Henry Jameson 2024-12-27 00:27:41 +02:00
parent 202a0e8dd7
commit 3caa45a8c5
2 changed files with 5 additions and 2 deletions

View file

@ -85,7 +85,10 @@ const EmojiReactions = {
'btn',
'button-default',
'emoji-reaction-count-button',
{ '-picked-reaction': this.reactedWith(reaction.name) }
{
'-picked-reaction': this.reactedWith(reaction.name),
toggled: this.reactedWith(reaction.name)
}
],
'aria-label': this.$tc('status.reaction_count_label', reaction.count, { num: reaction.count })
}

View file

@ -10,7 +10,7 @@
v-bind="!loggedIn ? { href: remoteInteractionLink } : {}"
role="button"
class="emoji-reaction btn button-default"
:class="{ '-picked-reaction': reactedWith(reaction.name) }"
:class="{ '-picked-reaction': reactedWith(reaction.name), toggled: reactedWith(reaction.name) }"
:title="reaction.url ? reaction.name : undefined"
:aria-pressed="reactedWith(reaction.name)"
@click="emojiOnClick(reaction.name, $event)"