Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/components/MessagesList/MessagesGroup/Message/Message.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
:is-deleting="isDeleting"
:has-call="conversation.hasCall"
:message="message"
:read-info="readInfo" />

<!-- reactions buttons and popover with details -->
<Reactions v-if="Object.keys(message.reactions).length"
:id="message.id"
:token="message.token"
:can-react="canReact"
:show-controls="isHovered || isFollowUpEmojiPickerOpen"
@emoji-picker-toggled="toggleFollowUpEmojiPicker" />
:read-info="readInfo">
<!-- reactions buttons and popover with details -->
<Reactions v-if="Object.keys(message.reactions).length"
:id="message.id"
:token="message.token"
:can-react="canReact"
:show-controls="isHovered || isFollowUpEmojiPickerOpen"
@emoji-picker-toggled="toggleFollowUpEmojiPicker" />
</MessageBody>
</div>

<!-- Message actions -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@
<CheckIcon :size="16" />
</div>
</div>

<!-- Reactions slot -->
<slot v-if="!isDeletedMessage" />
</div>
</template>

Expand Down Expand Up @@ -450,6 +453,7 @@ export default {
.message-main {
display: grid;
grid-template-columns: minmax(0, $messages-text-max-width) $messages-info-width;
grid-row-gap: var(--default-grid-baseline);
justify-content: space-between;
align-items: flex-start;
min-width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@after-show="fetchReactions">
<template #trigger>
<NcButton :type="userHasReacted(reaction) ? 'primary' : 'secondary'"
class="reaction-button"
size="small"
@click="handleReactionClick(reaction)">
{{ reaction }} {{ reactionsCount(reaction) }}
</NcButton>
Expand All @@ -39,11 +39,12 @@

<!-- all reactions button -->
<NcButton v-if="showControls"
class="reaction-button"
size="small"
:title="t('spreed', 'Show all reactions')"
@click="showAllReactions = true">
<HeartOutlineIcon :size="15" />
</NcButton>
<span v-else class="reaction-button--thumbnail" />

<!-- More reactions picker -->
<NcEmojiPicker v-if="canReact && showControls"
Expand All @@ -52,14 +53,15 @@
@select="handleReactionClick"
@after-show="emitEmojiPickerStatus"
@after-hide="emitEmojiPickerStatus">
<NcButton class="reaction-button"
<NcButton size="small"
:title="t('spreed', 'Add more reactions')"
:aria-label="t('spreed', 'Add more reactions')">
<template #icon>
<EmoticonPlusOutline :size="15" />
</template>
</NcButton>
</NcEmojiPicker>
<span v-else-if="canReact" class="reaction-button--thumbnail" />

<!-- all reactions modal-->
<ReactionsList v-if="showAllReactions"
Expand Down Expand Up @@ -274,20 +276,24 @@ export default {
</script>
<style lang="scss" scoped>
.reactions-wrapper {
--minimal-button-width: 48px;
display: flex;
flex-wrap: wrap;
margin: 4px 175px 4px -2px;
}
.reaction-button {
// Clear server rules
min-height: 0 !important;
margin: 2px;
height: 26px;
padding: 0 6px !important;
gap: var(--default-grid-baseline);

// Overwrite NcButton styles
:deep(.button-vue) {
min-width: var(--minimal-button-width);
}
:deep(.button-vue__text) {
font-weight: normal;
}

.reaction-button--thumbnail {
height: var(--clickable-area-small);
width: var(--minimal-button-width);
pointer-events: none;
}
}

.reaction-details {
Expand Down