Files
chatwoot/app/javascript/widget/views/Home.vue
Sivin Varghese 3a693947b5 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
2025-03-21 09:39:03 -07:00

44 lines
1.2 KiB
Vue
Executable File

<script>
import TeamAvailability from 'widget/components/TeamAvailability.vue';
import { mapGetters } from 'vuex';
import routerMixin from 'widget/mixins/routerMixin';
import configMixin from 'widget/mixins/configMixin';
import ArticleContainer from '../components/pageComponents/Home/Article/ArticleContainer.vue';
export default {
name: 'Home',
components: {
ArticleContainer,
TeamAvailability,
},
mixins: [configMixin, routerMixin],
computed: {
...mapGetters({
availableAgents: 'agent/availableAgents',
conversationSize: 'conversation/getConversationSize',
unreadMessageCount: 'conversation/getUnreadMessageCount',
}),
},
methods: {
startConversation() {
if (this.preChatFormEnabled && !this.conversationSize) {
return this.replaceRoute('prechat-form');
}
return this.replaceRoute('messages');
},
},
};
</script>
<template>
<div class="z-50 flex flex-col justify-end flex-1 w-full p-4 gap-4">
<TeamAvailability
:available-agents="availableAgents"
:has-conversation="!!conversationSize"
:unread-count="unreadMessageCount"
@start-conversation="startConversation"
/>
<ArticleContainer />
</div>
</template>