File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed
frontend/src/components/app/matches Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 22 <!-- eslint-disable max-len -->
33 <div class =" chat md:w-full md:max-w-2xl md:shadow-md md:rounded-md md:p-4 md:flex md:flex-col md:justify-start" >
44 <div class =" flex items-center justify-center" >
5- <div v-if =" user" class =" text-center flex-row" >
6- <ChatUser class =" mx-auto" v-bind:match =" user" v-bind:newmessage =" newMessage" ></ChatUser >
7- <h1 class =" text-gray-matcha opacity-75 text-sm" >{{user.first_name}}</h1 >
5+ <div v-if =" user" class =" text-center flex" >
6+ <div class =" flex-row" >
7+ <ChatUser class =" mx-auto" v-bind:match =" user" ></ChatUser >
8+ <h1 class =" text-gray-matcha opacity-75 text-sm" >{{user.first_name}}</h1 >
9+ </div >
10+ <div v-if =" newMessageCount" class =" ml-4 flex items-center justify-center" >
11+ <h1 class =" text-purple-matcha text-sm font-bold" >{{newMessageCount}}</h1 >
12+ </div >
813 </div >
914 <div class =" md:hidden absolute right-0 cursor-pointer text-lg lg:text-2xl w-10 h-10 flex items-center justify-center"
1015 v-on:click =" closeChat()" >
@@ -58,7 +63,7 @@ export default {
5863 user: null ,
5964 message: ' ' ,
6065 loggedInUserId: null ,
61- newMessage : false ,
66+ newMessageCount : null ,
6267 fetchMessagesIntervalId: null ,
6368 }),
6469 methods: {
@@ -92,10 +97,7 @@ export default {
9297 for (let i = this .messages .length ; i < newMessages .length ; i += 1 ) {
9398 this .messages .push (newMessages[i]);
9499 }
95- this .newMessage = true ;
96- setTimeout (() => {
97- this .newMessage = false ;
98- }, 2000 );
100+ this .scrollChatToBottom ();
99101 }
100102 },
101103 },
Original file line number Diff line number Diff line change 11<template >
2- <!-- eslint-disable max-len -->
32 <div v-bind:style =" {
43 'background-repeat': 'no-repeat',
54 'background-position': 'center center',
1514 'w-3': true,
1615 'h-3': true}" >
1716 </div >
18- <div v-if =" newmessage" class =" bg-purple-matcha absolute right-0 bottom-0 w-4 h-4 rounded-full" >
19- </div >
2017 </div >
2118</template >
2219
@@ -27,7 +24,7 @@ import imageWoman from '../../../assets/recommendations/avatars/woman1.png';
2724import imageOther from ' ../../../assets/recommendations/avatars/other.png' ;
2825
2926export default {
30- props: [' match' , ' newmessage ' ],
27+ props: [' match' ],
3128 methods: {
3229 getImage () {
3330 const { images } = this .match ;
You can’t perform that action at this time.
0 commit comments