feat: messages

This commit is contained in:
Shivam Mishra
2025-05-08 19:40:10 +05:30
parent e28c6312e4
commit bb6f7b9fcd
3 changed files with 38 additions and 10 deletions
+3
View File
@@ -15,6 +15,7 @@ import commonHelpers from 'dashboard/helper/commons';
import WootButton from '../dashboard/components-next/button/Button.vue';
import WootInput from '../dashboard/components-next/input/Input.vue';
import WootMessage from '../dashboard/components-next/message/Message.vue';
import MessageList from '../ui/MessageList.vue';
import i18nMessages from '../dashboard/i18n';
import { createI18n, I18nInjectionKey } from 'vue-i18n';
@@ -45,9 +46,11 @@ window.axios = createAxios(axios);
export const buttonElement = defineCustomElement(WootButton, ceOptions);
export const inputElement = defineCustomElement(WootInput, ceOptions);
export const messageElement = defineCustomElement(WootMessage, ceOptions);
export const messageListElement = defineCustomElement(MessageList, ceOptions);
// eslint-disable-next-line no-underscore-dangle
window.__CHATWOOT_STORE__ = store;
customElements.define('woot-button', buttonElement);
customElements.define('woot-input', inputElement);
customElements.define('woot-message', messageElement);
customElements.define('woot-message-list', messageListElement);
+33
View File
@@ -0,0 +1,33 @@
<script setup>
import Message from 'next/message/Message.vue';
import allMessages from 'next/message/fixtures/textWithMedia.js';
// const props = defineProps({
// accountId: {
// type: Number,
// required: true,
// },
// conversationId: {
// type: Number,
// required: true,
// },
// token: {
// type: String,
// required: true,
// },
// });
</script>
<template>
<ul class="px-4 bg-n-background">
<Message
v-for="message in allMessages"
:key="message.id"
v-bind="message"
:is-email-inbox="isAnEmailChannel"
:group-with-next="false"
:inbox-supports-reply-to="inboxSupportsReplyTo"
:current-user-id="currentUserId"
/>
</ul>
</template>