mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 04:27:53 +00:00
This PR has fixes for the following issues - Inconsistent spacing between meta and text in text bubble - Activity bubble overflows for longer text (for now I have truncated it, I'll work with @absurdiya on a better solution) - Ugly lookinh gradient for expand button on email bubble - Email bubble overflow issues and text rendering issues - Alignment for error message - Minute-wise grouping not working - Link color should not be blue - Use `gray-3` for bubble background instead of `gray-4`
32 lines
733 B
Vue
32 lines
733 B
Vue
<script setup>
|
|
import { computed } from 'vue';
|
|
import { useMessageContext } from '../../provider.js';
|
|
|
|
import MessageFormatter from 'shared/helpers/MessageFormatter.js';
|
|
import { MESSAGE_VARIANTS } from '../../constants';
|
|
|
|
const props = defineProps({
|
|
content: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
});
|
|
|
|
const { variant } = useMessageContext();
|
|
|
|
const formattedContent = computed(() => {
|
|
if (variant.value === MESSAGE_VARIANTS.ACTIVITY) {
|
|
return props.content;
|
|
}
|
|
|
|
return new MessageFormatter(props.content).formattedMessage;
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<span
|
|
v-dompurify-html="formattedContent"
|
|
class="[&_.link]:text-n-slate-11 [&_.link]:underline [&>p:last-child]:mb-0 [&>ul]:list-inside"
|
|
/>
|
|
</template>
|