From b230e22ed1eee78dc9e69a00660e52ed3f3054da Mon Sep 17 00:00:00 2001 From: padreug Date: Tue, 11 Feb 2025 15:32:12 +0100 Subject: [PATCH] almost there --- src/components/SupportChat.vue | 300 +++++++++++++----- .../ui/message-bubble/MessageBubble.vue | 190 +++++++++++ 2 files changed, 408 insertions(+), 82 deletions(-) create mode 100644 src/components/ui/message-bubble/MessageBubble.vue diff --git a/src/components/SupportChat.vue b/src/components/SupportChat.vue index 285ce67..85c2eb2 100644 --- a/src/components/SupportChat.vue +++ b/src/components/SupportChat.vue @@ -9,6 +9,7 @@ import { Input } from '@/components/ui/input' import { ScrollArea } from '@/components/ui/scroll-area' import { Avatar, AvatarImage, AvatarFallback } from '@/components/ui/avatar' import { Send, AlertCircle } from 'lucide-vue-next' +import MessageBubble from '@/components/ui/message-bubble/MessageBubble.vue' const nostrStore = useNostrStore() const input = ref('') @@ -121,90 +122,104 @@ const formatDate = (timestamp: number) => { } return date.toLocaleDateString() } + +const getMessageGroupClasses = (sent: boolean) => { + return [ + 'group flex flex-col gap-0.5 animate-in slide-in-from-bottom-2', + sent ? 'items-end' : 'items-start' + ] +}