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 { HeaderPageModule } from 'src/app/shared/header/header.module';
import { NewEventPageModule } from 'src/app/shared/agenda/new-event/new-event.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 { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
FormsModule, FormsModule,
IonicModule, IonicModule,
FontAwesomeModule,
PipesModule, PipesModule,
ChatPageRoutingModule, ChatPageRoutingModule,
RouterModule, RouterModule,
+10
View File
@@ -67,6 +67,16 @@
</div> </div>
<div class="item-description" [class.item-description-active]="dm._id == idSelected"> <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">{{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> </div>
</div> </div>
+3 -4
View File
@@ -86,7 +86,7 @@ ion-content{
} }
} }
.item-content{ .item-content{
width: 317px; //width: 317px;
float:right; float:right;
} }
@@ -96,7 +96,7 @@ ion-content{
margin-top: 10px; margin-top: 10px;
} }
.item-title{ .item-title{
width: 80%; width: calc(100% - 75px);
float: left; float: left;
font-size: 15px; font-size: 15px;
color: #0d89d1; color: #0d89d1;
@@ -105,7 +105,7 @@ ion-content{
color: #fff; color: #fff;
} }
.item-date{ .item-date{
width: 20%; width: 75px;
float: right; float: right;
font-size: 13px; font-size: 13px;
color: #797979; color: #797979;
@@ -130,7 +130,6 @@ ion-content{
@media only screen and (min-width: 701px) { @media only screen and (min-width: 701px) {
.main-content{ .main-content{
.aside-wrapper{ .aside-wrapper{
width: 35%; width: 35%;
border-right: 1px solid #d8d8d8; border-right: 1px solid #d8d8d8;
+1 -1
View File
@@ -384,7 +384,7 @@ hideRefreshButton(){
this.chatService.getAllDirectMessages().subscribe(async (res:any)=>{ this.chatService.getAllDirectMessages().subscribe(async (res:any)=>{
if(res != 200){ if(res != 200){
//console.log(res.ims); console.log(res.ims);
this.userDirectMessages = res.ims.sort((a,b)=>{ this.userDirectMessages = res.ims.sort((a,b)=>{
var dateA = new Date(a._updatedAt).getTime(); var dateA = new Date(a._updatedAt).getTime();
var dateB = new Date(b._updatedAt).getTime(); var dateB = new Date(b._updatedAt).getTime();