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:
committed by
GitHub
parent
8a283a7783
commit
c028f30f82
@@ -197,11 +197,16 @@ export default {
|
|||||||
'is-private': this.data.private,
|
'is-private': this.data.private,
|
||||||
'is-image': this.hasImageAttachment,
|
'is-image': this.hasImageAttachment,
|
||||||
'is-text': this.hasText,
|
'is-text': this.hasText,
|
||||||
|
'is-from-bot': this.isSentByBot,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
isPending() {
|
isPending() {
|
||||||
return this.data.status === MESSAGE_STATUS.PROGRESS;
|
return this.data.status === MESSAGE_STATUS.PROGRESS;
|
||||||
},
|
},
|
||||||
|
isSentByBot() {
|
||||||
|
if (this.isPending) return false;
|
||||||
|
return !this.sender.type || this.sender.type === 'bot';
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -250,6 +255,13 @@ export default {
|
|||||||
color: var(--color-body);
|
color: var(--color-body);
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.is-from-bot {
|
||||||
|
background: var(--v-400);
|
||||||
|
.message-text--metadata .time {
|
||||||
|
color: var(--v-50);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-pending {
|
&.is-pending {
|
||||||
|
|||||||
Reference in New Issue
Block a user