This commit is contained in:
tiago.kayaya
2021-03-17 09:06:42 +01:00
parent b667fad2a3
commit 41d9c2b5b6
6 changed files with 28 additions and 22 deletions
+2 -2
View File
@@ -93,8 +93,8 @@
<app-empty-chat class="d-flex height-100" *ngIf="showEmptyComponent"></app-empty-chat>
<app-messages class="d-flex height-100 flex-column" [roomId]="roomId" *ngIf="showMessages" #messagecontainer></app-messages>
<app-contacts *ngIf="showContacts" class="d-flex height-100"></app-contacts>
<app-new-group (closeAllDesktopComponent)="openGroupContactsPage()" *ngIf="showNewGroup" class="d-flex height-100 flex-column"></app-new-group>
<app-group-contacts [roomId]="roomId" class="d-flex height-100 flex-column" *ngIf="showGroupContacts"></app-group-contacts>
<app-new-group (addGroupMessage)="openGroupContactsPage($event)" *ngIf="showNewGroup" class="d-flex height-100 flex-column"></app-new-group>
<app-group-contacts (openGroupMessage)="openGroupMessagesPage($event)" [roomId]="groupRoomId" class="d-flex height-100 flex-column" *ngIf="showGroupContacts"></app-group-contacts>
<app-group-messages *ngIf="showGroupMessages" class="d-flex height-100 flex-column" [roomId]="roomId" #messagecontainer></app-group-messages>
</div>
</div>
+1
View File
@@ -44,6 +44,7 @@ ion-content{
overflow: auto;
.aside-wrapper{
border: 1px solid red;
padding: 0 !important;
margin: 0 !important;
}
+11 -4
View File
@@ -57,6 +57,7 @@ export class ChatPage implements OnInit {
componentRef: any;
roomId:any;
groupRoomId:any;
showEmptyComponent=true;
showMessages=false;
showContacts=false;
@@ -107,9 +108,13 @@ export class ChatPage implements OnInit {
this.showNewGroup=false;
this.showGroupMessages=false;
this.showEmptyComponent=false;
this.showGroupContacts=false;
console.log('All components closed!');
}
openGroupContactsPage(){
openGroupContactsPage(data){
console.log(data);
this.groupRoomId = data;
console.log(this.groupRoomId);
this.closeAllDesktopComponents();
if(window.innerWidth <= 1024){
@@ -150,14 +155,16 @@ export class ChatPage implements OnInit {
this.showNewGroup=true;
}
}
openGroupMessagesPage(rid) {
openGroupMessagesPage(data) {
console.log('HERE');
if( window.innerWidth <= 1024){
this.openGroupMessagesModal(rid);
this.openGroupMessagesModal(data);
}
else{
this.closeAllDesktopComponents();
this.showEmptyComponent = false;
this.roomId = rid;
this.roomId = data;
this.showGroupMessages=true;
}
}