diff --git a/app.vue b/app.vue index 78d4603..386a4dd 100644 --- a/app.vue +++ b/app.vue @@ -15,7 +15,18 @@ onMounted(() => { }); diff --git a/components/chat/ChatHeader.vue b/components/chat/ChatHeader.vue index 1b9e40b..fdac3d8 100644 --- a/components/chat/ChatHeader.vue +++ b/components/chat/ChatHeader.vue @@ -1,5 +1,5 @@ diff --git a/components/chat/ChatRow.vue b/components/chat/ChatRow.vue index a35ee3a..1f7715d 100644 --- a/components/chat/ChatRow.vue +++ b/components/chat/ChatRow.vue @@ -21,9 +21,12 @@ defineProps({ diff --git a/components/chat/CreateChatModal.vue b/components/chat/CreateChatModal.vue index 2ba8e68..11ba789 100644 --- a/components/chat/CreateChatModal.vue +++ b/components/chat/CreateChatModal.vue @@ -1,33 +1,46 @@ diff --git a/components/chat/InviteToChat.vue b/components/chat/InviteToChat.vue index abdc892..976e589 100644 --- a/components/chat/InviteToChat.vue +++ b/components/chat/InviteToChat.vue @@ -1,7 +1,7 @@ @@ -16,4 +16,15 @@ const inviteToChat = async () => { }; - + diff --git a/components/chat/MessageRow.vue b/components/chat/MessageRow.vue index 5ef3e0a..8beaa22 100644 --- a/components/chat/MessageRow.vue +++ b/components/chat/MessageRow.vue @@ -1,7 +1,9 @@ @@ -23,4 +25,17 @@ const date = new Date(props.message.createdAt); const formattedDate = `${date.getHours()}:${date.getMinutes()}`; - + diff --git a/components/chat/MessageSender.vue b/components/chat/MessageSender.vue index 500cc95..49d6bd0 100644 --- a/components/chat/MessageSender.vue +++ b/components/chat/MessageSender.vue @@ -1,7 +1,7 @@ @@ -37,4 +37,15 @@ const sendMessage = async () => { }; - + diff --git a/components/controls/SearchBar.vue b/components/controls/SearchBar.vue index f7664a5..222feb5 100644 --- a/components/controls/SearchBar.vue +++ b/components/controls/SearchBar.vue @@ -1,12 +1,22 @@ + diff --git a/components/layout/LeftSideContent.vue b/components/layout/LeftSideContent.vue index 929ab62..697d9e0 100644 --- a/components/layout/LeftSideContent.vue +++ b/components/layout/LeftSideContent.vue @@ -1,7 +1,7 @@ @@ -89,13 +87,14 @@ const connectWallet = async () => { } } }; - +const router = useRouter(); const disconnectWallet = async () => { if (window.ethereum) { try { logger.info('Disconnecting account'); await window.ethereum.request({ method: 'eth_accounts' }); accountStore.disconnect(); + router.push('/'); } catch (error) { logger.error(error); } diff --git a/components/layout/RightSideChat.vue b/components/layout/RightSideChat.vue index 31a05e2..b45d8da 100644 --- a/components/layout/RightSideChat.vue +++ b/components/layout/RightSideChat.vue @@ -164,7 +164,7 @@ onMounted(async () => { } .side-item { - @apply w-full flex justify-start items-center gap-2 text-white; + @apply w-full flex justify-start items-center gap-2; } &.right-nav-expanded { diff --git a/pages/chat/[id].vue b/pages/chat/[id].vue index 46d65fe..923a7b6 100644 --- a/pages/chat/[id].vue +++ b/pages/chat/[id].vue @@ -6,7 +6,7 @@
- +
@@ -49,6 +49,10 @@ if (!chat.value) { } const messages = computed(() => chatStore.getMessages(Number(route.params.id))); +const isMine = (message: ChatMessageResponseDTO) => { + return message.sender.address === accountStore.account; +}; + const pageNumber = ref(1); onMounted(async () => { diff --git a/pages/profile/index.vue b/pages/profile/index.vue new file mode 100644 index 0000000..d34e3f7 --- /dev/null +++ b/pages/profile/index.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/store/chat.ts b/store/chat.ts index ef8211e..f816077 100644 --- a/store/chat.ts +++ b/store/chat.ts @@ -27,7 +27,7 @@ export const useChatStore = defineStore({ this.invitations = invitations; }, setMessages(chatId: number, messages: ChatMessageResponseDTO[]) { - this.messages[chatId] = messages; + this.messages[chatId] = messages.reverse(); }, addMessage(chatId: number, message: ChatMessageResponseDTO) { if (!this.messages[chatId]) {