mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
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
44 lines
1.2 KiB
Vue
Executable File
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>
|