mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
save
This commit is contained in:
@@ -11,6 +11,8 @@ import { SharedModule } from 'src/app/shared/shared.module';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { GroupMessagesPage } from 'src/app/shared/chat/group-messages/group-messages.page';
|
||||
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';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -24,9 +26,10 @@ import { MessagesPage } from 'src/app/shared/chat/messages/messages.page';
|
||||
declarations: [
|
||||
ChatPage,
|
||||
MessagesPage,
|
||||
ContactsPage,
|
||||
GroupMessagesPage,
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
entryComponents: [MessagesPage, GroupMessagesPage]
|
||||
entryComponents: [MessagesPage,ContactsPage, GroupMessagesPage]
|
||||
})
|
||||
export class ChatPageModule {}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<div class="div-icon">
|
||||
<ion-icon slot="end" (click)="newGroup()" src="assets/images/icons-chat-new-group.svg" ></ion-icon>
|
||||
<ion-icon slot="end" (click)="selectContact()" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
|
||||
<ion-icon slot="end" (click)="openContactsPage()" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
<ion-toolbar>
|
||||
@@ -90,8 +90,10 @@
|
||||
<!-- <ion-button (click)="openMessagesPage()">Messages</ion-button>
|
||||
<ion-button (click)="openGroupMessagesPage('MduvQyrQBejb3xMrY')">Groups</ion-button>
|
||||
<ion-button (click)="destroyComponent()">Destroy</ion-button> -->
|
||||
<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-group-messages class="d-flex height-100 flex-column" [roomId]="roomId" *ngIf="showGroupMessages" #messagecontainer></app-group-messages>
|
||||
<app-contacts *ngIf="showContacts" class="d-flex height-100"></app-contacts>
|
||||
<app-group-messages *ngIf="showGroupMessages" class="d-flex height-100 flex-column" [roomId]="roomId" #messagecontainer></app-group-messages>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -57,7 +57,9 @@ export class ChatPage implements OnInit {
|
||||
componentRef: any;
|
||||
|
||||
roomId:any;
|
||||
showEmptyComponent=true;
|
||||
showMessages=false;
|
||||
showContacts=false;
|
||||
showGroupMessages=false;
|
||||
|
||||
@Output() getRoomInfo;
|
||||
@@ -99,7 +101,9 @@ export class ChatPage implements OnInit {
|
||||
}
|
||||
closeAllDesktopComponents() {
|
||||
this.showMessages=false;
|
||||
this.showContacts=false;
|
||||
this.showGroupMessages=false;
|
||||
this.showEmptyComponent=false;
|
||||
}
|
||||
openMessagesPage(rid) {
|
||||
if( window.innerWidth <= 1024){
|
||||
@@ -107,22 +111,35 @@ export class ChatPage implements OnInit {
|
||||
}
|
||||
else{
|
||||
this.closeAllDesktopComponents();
|
||||
this.showEmptyComponent = false;
|
||||
this.roomId = rid;
|
||||
this.showMessages=true;
|
||||
}
|
||||
}
|
||||
openContactsPage() {
|
||||
console.log('OK');
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
if( window.innerWidth <= 1024){
|
||||
//this.selectContact();
|
||||
}
|
||||
else{
|
||||
console.log('here');
|
||||
this.showContacts=true;
|
||||
}
|
||||
}
|
||||
openGroupMessagesPage(rid) {
|
||||
if( window.innerWidth <= 1024){
|
||||
this.openGroupMessagesModal(rid);
|
||||
}
|
||||
else{
|
||||
this.closeAllDesktopComponents();
|
||||
this.showEmptyComponent = false;
|
||||
this.roomId = rid;
|
||||
this.showGroupMessages=true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onSegmentChange(){
|
||||
this.load();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user