This commit is contained in:
tiago.kayaya
2021-03-16 14:33:36 +01:00
parent 79310babc8
commit eccad1e333
15 changed files with 159 additions and 50 deletions
+3
View File
@@ -14,6 +14,7 @@ import { MessagesPage } from 'src/app/shared/chat/messages/messages.page';
import { EmptyChatPage } from 'src/app/shared/chat/empty-chat/empty-chat.page';
import { ContactsPage } from 'src/app/shared/chat/messages/contacts/contacts.page';
import { NewGroupPage } from 'src/app/shared/chat/new-group/new-group.page';
import { GroupContactsPage } from 'src/app/shared/chat/group-messages/group-contacts/group-contacts.page';
@NgModule({
imports: [
@@ -30,6 +31,7 @@ import { NewGroupPage } from 'src/app/shared/chat/new-group/new-group.page';
ContactsPage,
GroupMessagesPage,
NewGroupPage,
GroupContactsPage,
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
entryComponents: [
@@ -37,6 +39,7 @@ import { NewGroupPage } from 'src/app/shared/chat/new-group/new-group.page';
ContactsPage,
GroupMessagesPage,
NewGroupPage,
GroupContactsPage,
]
})
export class ChatPageModule {}
+2 -1
View File
@@ -93,7 +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 *ngIf="showNewGroup" class="d-flex height-100 flex-column"></app-new-group>
<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-group-messages *ngIf="showGroupMessages" class="d-flex height-100 flex-column" [roomId]="roomId" #messagecontainer></app-group-messages>
</div>
</div>
+11
View File
@@ -62,6 +62,7 @@ export class ChatPage implements OnInit {
showContacts=false;
showNewGroup=false;
showGroupMessages=false;
showGroupContacts=false;
@Output() getRoomInfo;
@@ -106,6 +107,16 @@ export class ChatPage implements OnInit {
this.showNewGroup=false;
this.showGroupMessages=false;
this.showEmptyComponent=false;
console.log('All components closed!');
}
openGroupContactsPage(){
this.closeAllDesktopComponents();
if(window.innerWidth <= 1024){
}
else{
this.showGroupContacts = true;
}
}
openMessagesPage(rid) {
if( window.innerWidth <= 1024){