Merge with developer branch

This commit is contained in:
Eudes Inácio
2021-12-17 10:48:36 +01:00
71 changed files with 864 additions and 417 deletions
@@ -49,7 +49,7 @@ export class ContactsPage implements OnInit {
}
openMessagesPage(username:string){
if( window.innerWidth <= 1024){
if( window.innerWidth < 701){
this.createRoom(username);
}
else{
@@ -117,29 +117,19 @@ export class ContactsPage implements OnInit {
this.chatService.createRoom(body).subscribe(res => {
console.log(res);
this.room = res['room'];
this.getDirectMessage(this.room._id);
this.openMessagesModal(this.room._id);
});
}
getDirectMessage(roomId:any){
console.log(roomId);
this.chatService.getAllDirectMessages().subscribe(res=>{
let result = res['ims'].filter(data => data._id == roomId);
this.dm = result[0];
console.log(this.dm);
this.openModal(this.dm);
});
}
async openModal(dm:any){
this.close();
console.log(dm);
async openMessagesModal(roomId: any) {
console.log(roomId);
const modal = await this.modalController.create({
component: MessagesPage,
cssClass: 'group-messages',
backdropDismiss: false,
cssClass: 'modal modal-desktop isMessagesChatOpened',
componentProps: {
dm: dm,
roomId: roomId,
},
});
await modal.present();
@@ -121,25 +121,25 @@
<ion-fab-button (click)="bookMeeting()" color="light">
<ion-icon name="calendar"></ion-icon>
</ion-fab-button>
<ion-fab-button hidden (click)="addFile()" color="light">
<!-- <ion-fab-button hidden (click)="addFile()" color="light">
<ion-icon name="document"></ion-icon>
</ion-fab-button>
<ion-fab-button (click)="addImage()" color="light">
</ion-fab-button> -->
<!-- <ion-fab-button (click)="addImage()" color="light">
<ion-icon name="image"></ion-icon>
</ion-fab-button>
<ion-fab-button (click)="takePicture()" color="light">
</ion-fab-button> -->
<!-- <ion-fab-button (click)="takePicture()" color="light">
<ion-icon name="camera"></ion-icon>
</ion-fab-button>
</ion-fab-button> -->
<ion-fab-button (click)="addFileWebtrix()" color="light">
<ion-icon src="assets/icon/webtrix.svg"></ion-icon>
</ion-fab-button>
</ion-fab-list>
</ion-fab>
</div>
<div class="width-80">
<div class="width-100">
<ion-item class="ion-no-padding type-message" lines="none">
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
<ion-textarea (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
<button hidden class="btn-no-color" (click)="notImplemented()">
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
</button>
@@ -179,10 +179,11 @@
ion-footer{
padding-top: 7.5px;
padding-bottom: 7.5px;
.container{
justify-content: center;
justify-content: space-evenly;
align-items: center;
}
.chat-icon-options{
@@ -203,14 +204,15 @@
border: 1px solid #ebebeb;
border-radius: 25px;
padding-left: 15px;
margin: 0 15px 0 60px;
align-items: center;
overflow: auto;
ion-textarea{
margin: 0 !important;
align-self: center;
ion-textarea{
margin: 0 !important;
align-self: center;
}
}
}
}
@@ -735,7 +735,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
cssClass: 'modal modal-desktop',
componentProps: {
image: msg.attachments[0].image_url,
username: msg.u.username,
username: msg.u.name,
_updatedAt: msg._updatedAt
}
});