feat: Support Dark mode for the widget (#4137)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Sivin Varghese 2022-04-01 20:59:03 +05:30 committed by GitHub
parent 3813b3b372
commit caee9535f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 411 additions and 113 deletions

View file

@ -5,8 +5,13 @@
!isCards && !isOptions && !isForm && !isArticle && !isCards && !isCSAT
"
class="chat-bubble agent"
:class="$dm('bg-white', 'dark:bg-slate-700')"
>
<div class="message-content" v-html="formatMessage(message, false)"></div>
<div
class="message-content"
:class="$dm('text-black-900', 'dark:text-slate-50')"
v-html="formatMessage(message, false)"
></div>
<email-input
v-if="isTemplateEmail"
:message-id="messageId"
@ -60,6 +65,7 @@ import ChatOptions from 'shared/components/ChatOptions';
import ChatArticle from './template/Article';
import EmailInput from './template/EmailInput';
import CustomerSatisfaction from 'shared/components/CustomerSatisfaction';
import darkModeMixin from 'widget/mixins/darkModeMixin.js';
export default {
name: 'AgentMessageBubble',
@ -71,7 +77,7 @@ export default {
EmailInput,
CustomerSatisfaction,
},
mixins: [messageFormatterMixin],
mixins: [messageFormatterMixin, darkModeMixin],
props: {
message: { type: String, default: null },
contentType: { type: String, default: null },