File tree Expand file tree Collapse file tree 7 files changed +29
-5
lines changed Expand file tree Collapse file tree 7 files changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -462,6 +462,7 @@ messages="[
462462 content: 'message 1',
463463 senderId: 1234,
464464 username: 'John Doe',
465+ avatar: 'assets/imgs/doe.png',
465466 date: '13 November',
466467 timestamp: '10:20',
467468 system: false,
Original file line number Diff line number Diff line change @@ -426,6 +426,7 @@ export default {
426426 timestamp: parseTimestamp (timestamp, ' HH:mm' ),
427427 date: parseTimestamp (timestamp, ' DD MMMM YYYY' ),
428428 username: senderUser ? senderUser .username : null ,
429+ avatar: senderUser ? senderUser .avatar : null ,
429430 distributed: true
430431 }
431432 }
Original file line number Diff line number Diff line change 1919 :class =" { 'vac-offset-current': message.senderId === currentUserId }"
2020 >
2121 <slot name =" message" v-bind =" { message }" >
22+ <div
23+ v-if =" message.avatar && message.senderId !== currentUserId"
24+ class =" vac-avatar"
25+ :style =" { 'background-image': `url('${message.avatar}')` }"
26+ />
2227 <div
2328 class =" vac-message-container"
2429 :class =" {
@@ -399,6 +404,15 @@ export default {
399404 line-height : 1.4 ;
400405}
401406
407+ .vac-avatar {
408+ height : 28px ;
409+ width : 28px ;
410+ min-height : 28px ;
411+ min-width : 28px ;
412+ margin : 0 0 2px 0 ;
413+ align-self : flex-end ;
414+ }
415+
402416.vac-message-container {
403417 position : relative ;
404418 padding : 2px 10px ;
@@ -557,6 +571,14 @@ export default {
557571 max-width : 80% ;
558572 }
559573
574+ .vac-avatar {
575+ height : 25px ;
576+ width : 25px ;
577+ min-height : 25px ;
578+ min-width : 25px ;
579+ margin : 0 6px 1px 0 ;
580+ }
581+
560582 .vac-offset-current {
561583 margin-left : 20% ;
562584 }
Original file line number Diff line number Diff line change 2020 <slot name =" room-header-avatar" v-bind =" { room }" >
2121 <div
2222 v-if =" room.avatar"
23- class =" vac-room- avatar"
23+ class =" vac-avatar"
2424 :style =" { 'background-image': `url('${room.avatar}')` }"
2525 />
2626 </slot >
@@ -219,7 +219,7 @@ export default {
219219 line-height : 16px ;
220220 }
221221
222- .vac-room- avatar {
222+ .vac-avatar {
223223 height : 37px ;
224224 width : 37px ;
225225 min-height : 37px ;
Original file line number Diff line number Diff line change 1414 <div class =" vac-tags-info" >
1515 <div
1616 v-if =" user.avatar"
17- class =" vac-room- avatar vac-tags-avatar"
17+ class =" vac-avatar vac-tags-avatar"
1818 :style =" { 'background-image': `url('${user.avatar}')` }"
1919 />
2020 <div class =" vac-tags-username" >
Original file line number Diff line number Diff line change 33 <slot name =" room-list-item" v-bind =" { room }" >
44 <div
55 v-if =" room.avatar"
6- class =" vac-room- avatar"
6+ class =" vac-avatar"
77 :style =" { 'background-image': `url('${room.avatar}')` }"
88 />
99 <div class =" vac-name-container vac-text-ellipsis" >
Original file line number Diff line number Diff line change 4646 opacity : 0.7 ;
4747}
4848
49- .vac-room- avatar {
49+ .vac-avatar {
5050 background-size : cover ;
5151 background-position : center center ;
5252 background-repeat : no-repeat ;
You can’t perform that action at this time.
0 commit comments