From bb6f7b9fcd0e93fee12b208bb96796d31e3acec2 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 8 May 2025 19:40:10 +0530 Subject: [PATCH] feat: messages --- app/javascript/entrypoints/ui.js | 3 +++ app/javascript/ui/MessageList.vue | 33 +++++++++++++++++++++++++++++++ public/test-components.html | 12 ++--------- 3 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 app/javascript/ui/MessageList.vue diff --git a/app/javascript/entrypoints/ui.js b/app/javascript/entrypoints/ui.js index 04d6c6425..acfacade2 100644 --- a/app/javascript/entrypoints/ui.js +++ b/app/javascript/entrypoints/ui.js @@ -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); diff --git a/app/javascript/ui/MessageList.vue b/app/javascript/ui/MessageList.vue new file mode 100644 index 000000000..c974d4ce2 --- /dev/null +++ b/app/javascript/ui/MessageList.vue @@ -0,0 +1,33 @@ + + + diff --git a/public/test-components.html b/public/test-components.html index b9de31f41..9816b5b47 100644 --- a/public/test-components.html +++ b/public/test-components.html @@ -15,16 +15,8 @@

Input Component

-

Message Component

- +

Message List

+