Files
chatwoot/app/javascript/shared/components/DateSeparator.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

30 lines
817 B
Vue

<script>
import { formatDate } from 'shared/helpers/DateHelper';
export default {
props: {
date: {
type: String,
required: true,
},
},
computed: {
formattedDate() {
return formatDate({
date: this.date,
todayText: this.$t('TODAY'),
yesterdayText: this.$t('YESTERDAY'),
});
},
},
};
</script>
<template>
<div
class="text-sm text-n-slate-11 h-[50px] leading-[50px] relative text-center w-full before:content-[''] before:h-px before:absolute before:top-6 before:w-[calc((100%-120px)/2)] before:bg-n-slate-4 before:dark:bg-n-slate-6 before:left-0 after:content-[''] after:h-px after:absolute after:top-6 after:w-[calc((100%-120px)/2)] after:bg-n-slate-4 after:dark:bg-n-slate-6 after:right-0"
>
{{ formattedDate }}
</div>
</template>