This PR introduces a comprehensive, display-only template preview system for both WhatsApp and Twilio templates rendering of all supported template types. This lays the foundation for rich template previews across: - Template selection modals - Campaign creation flows - Message composer - Message screen. <img width="1818" height="2058" alt="template-preview" src="https://github.com/user-attachments/assets/9833b28c-f824-4568-8f74-6da09ac61f62" /> --------- Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: iamsivin <iamsivin@gmail.com> Co-authored-by: Muhsin <12408980+muhsin-k@users.noreply.github.com>
33 lines
925 B
Vue
33 lines
925 B
Vue
<script setup>
|
|
import Button from 'dashboard/components-next/button/Button.vue';
|
|
defineProps({
|
|
message: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
class="rounded-xl divide-y bg-n-alpha-2 divide-n-strong text-n-slate-12 max-w-80"
|
|
>
|
|
<div class="px-3 py-2.5">
|
|
<img :src="message.image_url" class="w-full max-h-44 rounded-lg" />
|
|
<div class="flex flex-col gap-2 pt-2.5">
|
|
<h6 class="font-semibold">{{ message.title }}</h6>
|
|
<span
|
|
v-dompurify-html="message.content"
|
|
class="text-sm prose prose-bubble"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="flex justify-center items-center p-3">
|
|
<Button label="Call us to order" link class="hover:!no-underline" />
|
|
</div>
|
|
<div class="flex justify-center items-center p-3">
|
|
<Button label="Visit our store" link class="hover:!no-underline" />
|
|
</div>
|
|
</div>
|
|
</template>
|