chore: Add a different color for messages from bot (#2374)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Nithin David Thomas 2021-06-04 21:54:06 +05:30 committed by GitHub
parent 8a283a7783
commit c028f30f82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -197,11 +197,16 @@ export default {
'is-private': this.data.private,
'is-image': this.hasImageAttachment,
'is-text': this.hasText,
'is-from-bot': this.isSentByBot,
};
},
isPending() {
return this.data.status === MESSAGE_STATUS.PROGRESS;
},
isSentByBot() {
if (this.isPending) return false;
return !this.sender.type || this.sender.type === 'bot';
},
},
};
</script>
@ -250,6 +255,13 @@ export default {
color: var(--color-body);
text-decoration: underline;
}
&.is-from-bot {
background: var(--v-400);
.message-text--metadata .time {
color: var(--v-50);
}
}
}
&.is-pending {