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
1 change: 1 addition & 0 deletions src/components/NewMessageForm/NewMessageForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<div v-if="messageToBeReplied" class="new-message-form__quote">
<Quote
:is-new-message-form-quote="true"
:parent-id="messageToBeReplied.id"
v-bind="messageToBeReplied" />
</div>

Expand Down
22 changes: 21 additions & 1 deletion src/components/Quote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ components.
<template>
<a href="#"
class="quote"
:class="{'quote-own-message': isOwnMessageQuoted}"
@click.prevent="handleQuoteClick">
<div class="quote__main">
<div class="quote__main__author" role="heading" aria-level="4">
Expand Down Expand Up @@ -71,6 +72,10 @@ export default {
RichText,
},
props: {
actorId: {
type: String,
required: true,
},
/**
* The sender of the message to be replied to.
*/
Expand Down Expand Up @@ -145,6 +150,16 @@ export default {
return displayName
},

isOwnMessageQuoted() {
let actorId = this.actorId
if (this.actorType === 'guests') {
actorId = 'guest/' + actorId
}

return actorId === this.$store.getters.getActorId()
&& this.actorType === this.$store.getters.getActorType()
},

isFileShareMessage() {
return this.message === '{file}'
&& 'file' in this.messageParameters
Expand Down Expand Up @@ -225,11 +240,16 @@ export default {
@import '../assets/variables';

.quote {
border-left: 4px solid var(--color-primary);
border-left: 4px solid var(--color-border-dark);
margin: 4px 0 4px 8px;
padding-left: 8px;
display: flex;
max-width: $messages-list-max-width - $message-utils-width;

&.quote-own-message {
border-left: 4px solid var(--color-primary);
}

&__main {
display: flex;
flex-direction: column;
Expand Down