Skip to content

Commit

Permalink
fix chatMessages (party chat) message spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
negue committed Jan 5, 2025
1 parent 5ce4f14 commit ba6a591
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
16 changes: 16 additions & 0 deletions website/client/src/components/chat/chatMessages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<div
v-for="msg in messages.filter(m => chat && canViewFlag(m))"
:key="msg.id"
class="message-row"
:class="{ 'margin-right': user._id !== msg.uuid}"
>
<div class="d-flex">
<avatar
Expand Down Expand Up @@ -135,6 +137,18 @@
.message-scroll .d-flex {
min-width: 1px;
}
.message-row {
margin-left: 12px;
margin-right: 0;
margin-bottom: 1.2rem;
&:not(.margin-right) {
.d-flex {
justify-content: flex-end;
}
}
}
</style>

<script>
Expand All @@ -147,6 +161,8 @@ import { userStateMixin } from '../../mixins/userState';
import Avatar from '../avatar';
import MessageCard from '@/components/messages/messageCard.vue';
// TODO merge chatMessages.vue (party message list) with messageList.vue (private message list)
export default {
components: {
MessageCard,
Expand Down
6 changes: 3 additions & 3 deletions website/client/src/components/groups/chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<slot name="additionRow"></slot>
<div class="row">
<div class="hr col-12"></div>
<chat-message
<chat-messages
:chat.sync="group.chat"
:group-type="group.type"
:group-id="group._id"
Expand All @@ -91,7 +91,7 @@ import externalLinks from '../../mixins/externalLinks';
import autocomplete from '../chat/autoComplete';
import communityGuidelines from './communityGuidelines';
import chatMessage from '../chat/chatMessages';
import chatMessages from '../chat/chatMessages';
import { mapState } from '@/libs/store';
import markdownDirective from '@/directives/markdown';
import { autoCompleteHelperMixin } from '@/mixins/autoCompleteHelper';
Expand All @@ -103,7 +103,7 @@ export default {
components: {
autocomplete,
communityGuidelines,
chatMessage,
chatMessages,
},
mixins: [externalLinks, autoCompleteHelperMixin],
props: ['label', 'group', 'placeholder'],
Expand Down
2 changes: 1 addition & 1 deletion website/client/src/components/messages/messageList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
}
.message-list {
width: 100%;
width: 100%;
padding-right: 10px;
margin-right: 0 !important;
}
Expand Down

0 comments on commit ba6a591

Please sign in to comment.