improve conversation list to add details when the message is picture or file

This commit is contained in:
tiago.kayaya
2021-09-27 10:53:57 +01:00
parent 47a6f5c384
commit 4d2a9b2eed
4 changed files with 16 additions and 6 deletions
+2 -1
View File
@@ -28,13 +28,14 @@ import { EmptyChatPageModule } from 'src/app/shared/chat/empty-chat/empty-chat.m
import { HeaderPageModule } from 'src/app/shared/header/header.module';
import { NewEventPageModule } from 'src/app/shared/agenda/new-event/new-event.module';
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
FontAwesomeModule,
PipesModule,
ChatPageRoutingModule,
RouterModule,
+10
View File
@@ -67,6 +67,16 @@
</div>
<div class="item-description" [class.item-description-active]="dm._id == idSelected">
<ion-label *ngIf="dm.lastMessage">{{dm.lastMessage.msg}}</ion-label>
<ion-label *ngIf="dm.lastMessage.file">
<fa-icon icon="file-alt" class="pdf-icon"></fa-icon>
<span> {{dm.lastMessage.file.name}}</span>
</ion-label>
<ion-label *ngIf="dm.lastMessage.attachments">
<div *ngIf="dm.lastMessage.attachments[0].image_url">
<fa-icon icon="image" class="pdf-icon"></fa-icon>
<span> Fotografia</span>
</div>
</ion-label>
</div>
</div>
</div>
+3 -4
View File
@@ -86,7 +86,7 @@ ion-content{
}
}
.item-content{
width: 317px;
//width: 317px;
float:right;
}
@@ -96,7 +96,7 @@ ion-content{
margin-top: 10px;
}
.item-title{
width: 80%;
width: calc(100% - 75px);
float: left;
font-size: 15px;
color: #0d89d1;
@@ -105,7 +105,7 @@ ion-content{
color: #fff;
}
.item-date{
width: 20%;
width: 75px;
float: right;
font-size: 13px;
color: #797979;
@@ -130,7 +130,6 @@ ion-content{
@media only screen and (min-width: 701px) {
.main-content{
.aside-wrapper{
width: 35%;
border-right: 1px solid #d8d8d8;
+1 -1
View File
@@ -384,7 +384,7 @@ hideRefreshButton(){
this.chatService.getAllDirectMessages().subscribe(async (res:any)=>{
if(res != 200){
//console.log(res.ims);
console.log(res.ims);
this.userDirectMessages = res.ims.sort((a,b)=>{
var dateA = new Date(a._updatedAt).getTime();
var dateB = new Date(b._updatedAt).getTime();