mirror of
https://github.com/Arcadia-Solutions/arcadia.git
synced 2025-12-21 09:19:33 -06:00
feat: simplify message display in private conversations
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<ContentContainer class="comment-container">
|
||||
<div :class="{ comment: true, 'reverse-user-position': reverseUserPosition }">
|
||||
<div class="comment">
|
||||
<div class="user">
|
||||
<img class="avatar" :src="comment.created_by.avatar ?? '/default_user_avatar.jpg'" :alt="comment.created_by.username + '\'s avatar'" />
|
||||
<RouterLink :to="`/user/${comment.created_by.id}`">
|
||||
@@ -35,7 +35,6 @@ const { t } = useI18n()
|
||||
|
||||
defineProps<{
|
||||
comment: TitleGroupCommentHierarchy | ForumPostHierarchy | ConversationMessageHierarchy
|
||||
reverseUserPosition?: boolean
|
||||
}>()
|
||||
</script>
|
||||
|
||||
@@ -46,9 +45,6 @@ defineProps<{
|
||||
.comment {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
&.reverse-user-position {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
}
|
||||
.user {
|
||||
display: flex;
|
||||
@@ -62,12 +58,6 @@ defineProps<{
|
||||
width: 7em;
|
||||
border-radius: 7px;
|
||||
}
|
||||
.reverse-user-position {
|
||||
.comment-body {
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.comment-body {
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
v-for="message in messages"
|
||||
:key="message.id"
|
||||
:comment="message"
|
||||
:reverseUserPosition="userStore.id === message.created_by.id"
|
||||
:class="`message ${userStore.id === message.created_by.id ? 'sent' : 'received'}`"
|
||||
/>
|
||||
</div>
|
||||
@@ -27,10 +26,4 @@ defineProps<{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.message {
|
||||
width: 95%;
|
||||
&.sent {
|
||||
align-self: flex-end;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user