diff options
| author | tusooa <tusooa@kazv.moe> | 2023-05-22 22:09:04 -0400 |
|---|---|---|
| committer | tusooa <tusooa@kazv.moe> | 2023-05-22 22:09:04 -0400 |
| commit | 8a1074336c3cce8111a23281bbe71301b93c3420 (patch) | |
| tree | 461899db62696fb58811a0e6743b87fe7bd7c0fc /src/components/emoji_reactions | |
| parent | ed23f51838477dc04fb5daedb6bf1bdf96f2ca65 (diff) | |
Make emoji reactions clickable when not logged in
Diffstat (limited to 'src/components/emoji_reactions')
| -rw-r--r-- | src/components/emoji_reactions/emoji_reactions.js | 3 | ||||
| -rw-r--r-- | src/components/emoji_reactions/emoji_reactions.vue | 20 |
2 files changed, 11 insertions, 12 deletions
diff --git a/src/components/emoji_reactions/emoji_reactions.js b/src/components/emoji_reactions/emoji_reactions.js index b3520a55..74cb844c 100644 --- a/src/components/emoji_reactions/emoji_reactions.js +++ b/src/components/emoji_reactions/emoji_reactions.js @@ -45,6 +45,9 @@ const EmojiReactions = { }, loggedIn () { return !!this.$store.state.users.currentUser + }, + remoteInteractionLink () { + return this.$store.getters.remoteInteractionLink({ statusId: this.status.id }) } }, methods: { diff --git a/src/components/emoji_reactions/emoji_reactions.vue b/src/components/emoji_reactions/emoji_reactions.vue index 3171785b..f30afcb2 100644 --- a/src/components/emoji_reactions/emoji_reactions.vue +++ b/src/components/emoji_reactions/emoji_reactions.vue @@ -5,9 +5,12 @@ :key="reaction.url || reaction.name" class="emoji-reaction-container btn-group" > - <button + <component + :is="loggedIn ? 'button' : 'a'" + v-bind="!loggedIn ? { href: remoteInteractionLink } : {}" + role="button" class="emoji-reaction btn button-default" - :class="{ '-picked-reaction': reactedWith(reaction.name), 'not-clickable': !loggedIn }" + :class="{ '-picked-reaction': reactedWith(reaction.name) }" @click="emojiOnClick(reaction.name, $event)" > <span @@ -45,7 +48,7 @@ icon="minus" /> </FALayers> - </button> + </component> <UserListPopover :users="accountsForEmoji[reaction.name]" class="emoji-reaction-popover" @@ -112,6 +115,8 @@ align-items: center; justify-content: center; box-sizing: border-box; + border-top-right-radius: 0; + border-bottom-right-radius: 0; .reaction-emoji { width: var(--emoji-size); @@ -138,15 +143,6 @@ outline: none; } - &.not-clickable { - cursor: default; - - &:hover { - box-shadow: $fallback--buttonShadow; - box-shadow: var(--buttonShadow); - } - } - &.-picked-reaction { border: 1px solid var(--accent, $fallback--link); margin-left: -1px; // offset the border, can't use inset shadows either |
