diff --git a/img/emojis/Clap.gif b/img/emojis/Clap.gif new file mode 100644 index 00000000000..c2ed0b755f3 Binary files /dev/null and b/img/emojis/Clap.gif differ diff --git a/img/emojis/Concerned.gif b/img/emojis/Concerned.gif new file mode 100644 index 00000000000..1cb66be6c33 Binary files /dev/null and b/img/emojis/Concerned.gif differ diff --git a/img/emojis/Heart.gif b/img/emojis/Heart.gif new file mode 100644 index 00000000000..2f63decc45e Binary files /dev/null and b/img/emojis/Heart.gif differ diff --git a/img/emojis/Joy.gif b/img/emojis/Joy.gif new file mode 100644 index 00000000000..cb72152d359 Binary files /dev/null and b/img/emojis/Joy.gif differ diff --git a/img/emojis/Party.gif b/img/emojis/Party.gif new file mode 100644 index 00000000000..b9f809e8d98 Binary files /dev/null and b/img/emojis/Party.gif differ diff --git a/img/emojis/Star-struck.gif b/img/emojis/Star-struck.gif new file mode 100644 index 00000000000..08feb7dee6e Binary files /dev/null and b/img/emojis/Star-struck.gif differ diff --git a/img/emojis/Surprised.gif b/img/emojis/Surprised.gif new file mode 100644 index 00000000000..06a6cdae83c Binary files /dev/null and b/img/emojis/Surprised.gif differ diff --git a/img/emojis/Thinking-face.gif b/img/emojis/Thinking-face.gif new file mode 100644 index 00000000000..21388a7b588 Binary files /dev/null and b/img/emojis/Thinking-face.gif differ diff --git a/img/emojis/Thumbs-down.gif b/img/emojis/Thumbs-down.gif new file mode 100644 index 00000000000..6a3dcf05d73 Binary files /dev/null and b/img/emojis/Thumbs-down.gif differ diff --git a/img/emojis/Thumbs-up.gif b/img/emojis/Thumbs-up.gif new file mode 100644 index 00000000000..bbaaddc77a7 Binary files /dev/null and b/img/emojis/Thumbs-up.gif differ diff --git a/src/components/CallView/shared/ReactionToaster.vue b/src/components/CallView/shared/ReactionToaster.vue index 9050607b8e4..b966fbcdee4 100644 --- a/src/components/CallView/shared/ReactionToaster.vue +++ b/src/components/CallView/shared/ReactionToaster.vue @@ -28,7 +28,13 @@ :key="toast.seed" class="toast" :style="styled(toast.name, toast.seed)"> - + + {{ toast.reaction }} @@ -43,6 +49,7 @@ import Hex from 'crypto-js/enc-hex.js' import SHA1 from 'crypto-js/sha1.js' import { subscribe, unsubscribe } from '@nextcloud/event-bus' +import { imagePath } from '@nextcloud/router' import usernameToColor from '@nextcloud/vue/dist/Functions/usernameToColor.js' @@ -50,6 +57,19 @@ import TransitionWrapper from '../../TransitionWrapper.vue' import { useGuestNameStore } from '../../../stores/guestName.js' +const reactions = { + '❤️': 'Heart.gif', + '🎉': 'Party.gif', + '👏': 'Clap.gif', + '👍': 'Thumbs-up.gif', + '👎': 'Thumbs-down.gif', + '😂': 'Joy.gif', + '🤩': 'Star-struck.gif', + '🤔': 'Thinking-face.gif', + '😲': 'Surprised.gif', + '😥': 'Concerned.gif', +} + export default { name: 'ReactionToaster', @@ -153,6 +173,7 @@ export default { this.reactionsQueue.push({ id: model.attributes.peerId, reaction, + reactionURL: this.getReactionURL(reaction), name: isLocalModel ? this.$store.getters.getDisplayName() || t('spreed', 'Guest') : this.getParticipantName(model), @@ -186,6 +207,12 @@ export default { return this.guestNameStore.getGuestName(this.token, Hex.stringify(SHA1(peerId))) }, + getReactionURL(emoji) { + return reactions[emoji] + ? imagePath('spreed', 'emojis/' + reactions[emoji]) + : undefined + }, + styled(name, seed) { const color = usernameToColor(name) @@ -229,6 +256,10 @@ export default { & { font-size: 150%; } + &-img { + width: 30px; + height: 30px; + } } }