2020-01-14 10:06:14 +02:00
|
|
|
<template>
|
2022-10-17 22:11:07 +03:00
|
|
|
<div class="EmojiReactions">
|
2023-05-22 22:02:22 -04:00
|
|
|
<span
|
2020-01-26 15:45:12 +02:00
|
|
|
v-for="(reaction) in emojiReactions"
|
2022-12-18 22:04:58 +03:00
|
|
|
:key="reaction.url || reaction.name"
|
2023-05-22 22:02:22 -04:00
|
|
|
class="emoji-reaction-container btn-group"
|
2020-01-14 10:06:14 +02:00
|
|
|
>
|
2023-05-22 22:09:04 -04:00
|
|
|
<component
|
|
|
|
|
:is="loggedIn ? 'button' : 'a'"
|
|
|
|
|
v-bind="!loggedIn ? { href: remoteInteractionLink } : {}"
|
|
|
|
|
role="button"
|
2020-11-24 12:32:42 +02:00
|
|
|
class="emoji-reaction btn button-default"
|
2024-12-27 00:27:41 +02:00
|
|
|
:class="{ '-picked-reaction': reactedWith(reaction.name), toggled: reactedWith(reaction.name) }"
|
2023-05-22 22:18:42 -04:00
|
|
|
:title="reaction.url ? reaction.name : undefined"
|
|
|
|
|
:aria-pressed="reactedWith(reaction.name)"
|
2020-02-11 12:24:51 +00:00
|
|
|
@click="emojiOnClick(reaction.name, $event)"
|
|
|
|
|
>
|
2022-12-18 22:04:58 +03:00
|
|
|
<span
|
|
|
|
|
class="reaction-emoji"
|
|
|
|
|
>
|
2024-12-23 23:01:15 +02:00
|
|
|
<StillImage
|
2023-03-17 23:30:46 +03:00
|
|
|
v-if="reaction.url"
|
2022-12-18 22:04:58 +03:00
|
|
|
:src="reaction.url"
|
|
|
|
|
class="reaction-emoji-content"
|
2024-12-23 23:01:15 +02:00
|
|
|
/>
|
2023-03-17 23:30:46 +03:00
|
|
|
<span
|
|
|
|
|
v-else
|
|
|
|
|
class="reaction-emoji reaction-emoji-content"
|
|
|
|
|
>{{ reaction.name }}</span>
|
2022-12-18 22:04:58 +03:00
|
|
|
</span>
|
2023-05-22 22:02:22 -04:00
|
|
|
<FALayers>
|
2023-05-22 22:20:09 -04:00
|
|
|
<FAIcon
|
|
|
|
|
v-if="reactedWith(reaction.name)"
|
|
|
|
|
class="active-marker"
|
|
|
|
|
transform="shrink-6 up-9"
|
|
|
|
|
icon="check"
|
|
|
|
|
/>
|
|
|
|
|
<FAIcon
|
|
|
|
|
v-if="!reactedWith(reaction.name)"
|
|
|
|
|
class="focus-marker"
|
|
|
|
|
transform="shrink-6 up-9"
|
|
|
|
|
icon="plus"
|
|
|
|
|
/>
|
|
|
|
|
<FAIcon
|
|
|
|
|
v-else
|
|
|
|
|
class="focus-marker"
|
|
|
|
|
transform="shrink-6 up-9"
|
|
|
|
|
icon="minus"
|
|
|
|
|
/>
|
2023-05-22 22:02:22 -04:00
|
|
|
</FALayers>
|
2023-05-22 22:09:04 -04:00
|
|
|
</component>
|
2023-05-22 22:20:09 -04:00
|
|
|
<UserListPopover
|
|
|
|
|
:users="accountsForEmoji[reaction.name]"
|
|
|
|
|
class="emoji-reaction-popover"
|
2023-05-22 22:30:54 -04:00
|
|
|
:trigger-attrs="counterTriggerAttrs(reaction)"
|
2023-05-22 22:20:09 -04:00
|
|
|
@show="fetchEmojiReactionsByIfMissing()"
|
|
|
|
|
>
|
|
|
|
|
<span class="emoji-reaction-counts">{{ reaction.count }}</span>
|
|
|
|
|
</UserListPopover>
|
2023-05-22 22:02:22 -04:00
|
|
|
</span>
|
2020-02-11 12:24:51 +00:00
|
|
|
<a
|
2020-02-28 16:39:47 +00:00
|
|
|
v-if="tooManyReactions"
|
|
|
|
|
class="emoji-reaction-expand faint"
|
|
|
|
|
href="javascript:void(0)"
|
|
|
|
|
@click="toggleShowAll"
|
|
|
|
|
>
|
|
|
|
|
{{ showAll ? $t('general.show_less') : showMoreString }}
|
|
|
|
|
</a>
|
2020-01-14 10:06:14 +02:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2022-07-31 12:35:48 +03:00
|
|
|
<script src="./emoji_reactions.js"></script>
|
2020-01-14 10:06:14 +02:00
|
|
|
|
2025-02-18 22:31:33 +02:00
|
|
|
<style src="./emoji_reactions.scss" lang="scss" />
|