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="[
462
462
content: 'message 1',
463
463
senderId: 1234,
464
464
username: 'John Doe',
465
+ avatar: 'assets/imgs/doe.png',
465
466
date: '13 November',
466
467
timestamp: '10:20',
467
468
system: false,
Original file line number Diff line number Diff line change @@ -426,6 +426,7 @@ export default {
426
426
timestamp: parseTimestamp (timestamp, ' HH:mm' ),
427
427
date: parseTimestamp (timestamp, ' DD MMMM YYYY' ),
428
428
username: senderUser ? senderUser .username : null ,
429
+ avatar: senderUser ? senderUser .avatar : null ,
429
430
distributed: true
430
431
}
431
432
}
Original file line number Diff line number Diff line change 19
19
:class =" { 'vac-offset-current': message.senderId === currentUserId }"
20
20
>
21
21
<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
+ />
22
27
<div
23
28
class =" vac-message-container"
24
29
:class =" {
@@ -399,6 +404,15 @@ export default {
399
404
line-height : 1.4 ;
400
405
}
401
406
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
+
402
416
.vac-message-container {
403
417
position : relative ;
404
418
padding : 2px 10px ;
@@ -557,6 +571,14 @@ export default {
557
571
max-width : 80% ;
558
572
}
559
573
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
+
560
582
.vac-offset-current {
561
583
margin-left : 20% ;
562
584
}
Original file line number Diff line number Diff line change 20
20
<slot name =" room-header-avatar" v-bind =" { room }" >
21
21
<div
22
22
v-if =" room.avatar"
23
- class =" vac-room- avatar"
23
+ class =" vac-avatar"
24
24
:style =" { 'background-image': `url('${room.avatar}')` }"
25
25
/>
26
26
</slot >
@@ -219,7 +219,7 @@ export default {
219
219
line-height : 16px ;
220
220
}
221
221
222
- .vac-room- avatar {
222
+ .vac-avatar {
223
223
height : 37px ;
224
224
width : 37px ;
225
225
min-height : 37px ;
Original file line number Diff line number Diff line change 14
14
<div class =" vac-tags-info" >
15
15
<div
16
16
v-if =" user.avatar"
17
- class =" vac-room- avatar vac-tags-avatar"
17
+ class =" vac-avatar vac-tags-avatar"
18
18
:style =" { 'background-image': `url('${user.avatar}')` }"
19
19
/>
20
20
<div class =" vac-tags-username" >
Original file line number Diff line number Diff line change 3
3
<slot name =" room-list-item" v-bind =" { room }" >
4
4
<div
5
5
v-if =" room.avatar"
6
- class =" vac-room- avatar"
6
+ class =" vac-avatar"
7
7
:style =" { 'background-image': `url('${room.avatar}')` }"
8
8
/>
9
9
<div class =" vac-name-container vac-text-ellipsis" >
Original file line number Diff line number Diff line change 46
46
opacity : 0.7 ;
47
47
}
48
48
49
- .vac-room- avatar {
49
+ .vac-avatar {
50
50
background-size : cover ;
51
51
background-position : center center ;
52
52
background-repeat : no-repeat ;
You can’t perform that action at this time.
0 commit comments