feat: Add RTL Support to Widget (#11022)

This PR adds RTL support to the web widget for improved right-to-left language compatibility, updates colors, and cleans up code.

Fixes https://linear.app/chatwoot/issue/CW-4089/rtl-issues-on-widget

https://github.com/chatwoot/chatwoot/issues/9791

Other PR: https://github.com/chatwoot/chatwoot/pull/11016
This commit is contained in:
Sivin Varghese
2025-03-21 22:09:03 +05:30
committed by GitHub
parent e4ea078e52
commit 3a693947b5
76 changed files with 966 additions and 2406 deletions

View File

@@ -6,7 +6,6 @@ import ChatOptions from 'shared/components/ChatOptions.vue';
import ChatArticle from './template/Article.vue';
import EmailInput from './template/EmailInput.vue';
import CustomerSatisfaction from 'shared/components/CustomerSatisfaction.vue';
import { useDarkMode } from 'widget/composables/useDarkMode';
import IntegrationCard from './template/IntegrationCard.vue';
export default {
@@ -33,13 +32,11 @@ export default {
setup() {
const { formatMessage, getPlainText, truncateMessage, highlightContent } =
useMessageFormatter();
const { getThemeClass } = useDarkMode();
return {
formatMessage,
getPlainText,
truncateMessage,
highlightContent,
getThemeClass,
};
},
computed: {
@@ -98,12 +95,11 @@ export default {
v-if="
!isCards && !isOptions && !isForm && !isArticle && !isCards && !isCSAT
"
class="chat-bubble agent"
:class="getThemeClass('bg-white', 'dark:bg-slate-700 has-dark-mode')"
class="chat-bubble agent bg-n-background dark:bg-n-solid-3 text-n-slate-12"
>
<div
v-dompurify-html="formatMessage(message, false)"
class="message-content text-slate-900 dark:text-slate-50"
class="message-content text-n-slate-12"
/>
<EmailInput
v-if="isTemplateEmail"