File tree Expand file tree Collapse file tree 3 files changed +28
-6
lines changed Expand file tree Collapse file tree 3 files changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -267,7 +267,8 @@ export default {
267
267
return {
268
268
content,
269
269
timestamp,
270
- seen: message .sender_id === this .currentUserId ? message .seen : null
270
+ seen: message .sender_id === this .currentUserId ? message .seen : null ,
271
+ new: message .sender_id !== this .currentUserId && ! message .seen
271
272
}
272
273
},
273
274
Original file line number Diff line number Diff line change 42
42
{{ room.lastMessage.timestamp }}
43
43
</div >
44
44
</div >
45
- <div class =" room-name text-last" v-if =" room.lastMessage" >
45
+ <div
46
+ class =" room-name text-last"
47
+ :class =" { 'message-new': room.lastMessage.new }"
48
+ v-if =" room.lastMessage"
49
+ >
46
50
<span v-if =" room.lastMessage.seen" >
47
51
<svg-icon name =" checkmark" class =" icon-check" />
48
52
</span >
53
+ <span v-if =" room.lastMessage.new" class =" dot-new" ></span >
49
54
<span >{{ room.lastMessage.content }}</span >
50
55
</div >
51
56
</div >
@@ -224,6 +229,19 @@ input {
224
229
font-size : 12px ;
225
230
}
226
231
232
+ .message-new {
233
+ color : var (--chat-room-color-username );
234
+ }
235
+
236
+ .dot-new {
237
+ height : 8px ;
238
+ width : 8px ;
239
+ background-color : var (--chat-room-color-new-dot );
240
+ border-radius : 50% ;
241
+ display : inline-block ;
242
+ margin : 0 5px 0 0 ;
243
+ }
244
+
227
245
.text-date {
228
246
color : var (--chat-room-color-timestamp );
229
247
font-size : 11px ;
Original file line number Diff line number Diff line change @@ -56,11 +56,12 @@ export const defaultThemeColors = {
56
56
room : {
57
57
colorUsername : '#0a0a0a' ,
58
58
colorMessage : '#67717a' ,
59
- colorTimestamp : '#a2aeb8'
59
+ colorTimestamp : '#a2aeb8' ,
60
+ colorNewDot : '#1976d2'
60
61
} ,
61
62
62
63
emoji : {
63
- background : '#fff' ,
64
+ background : '#fff'
64
65
} ,
65
66
66
67
icons : {
@@ -140,11 +141,12 @@ export const defaultThemeColors = {
140
141
room : {
141
142
colorUsername : '#fff' ,
142
143
colorMessage : '#6c7278' ,
143
- colorTimestamp : '#6c7278'
144
+ colorTimestamp : '#6c7278' ,
145
+ colorNewDot : '#1976d2'
144
146
} ,
145
147
146
148
emoji : {
147
- background : '#343740' ,
149
+ background : '#343740'
148
150
} ,
149
151
150
152
icons : {
@@ -232,6 +234,7 @@ export const cssThemeVars = ({
232
234
'--chat-room-color-username' : room . colorUsername ,
233
235
'--chat-room-color-message' : room . colorMessage ,
234
236
'--chat-room-color-timestamp' : room . colorTimestamp ,
237
+ '--chat-room-color-new-dot' : room . colorNewDot ,
235
238
236
239
// emoji
237
240
'--chat-emoji-bg-color' : emoji . background ,
You can’t perform that action at this time.
0 commit comments