mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
improve chat user flow
This commit is contained in:
@@ -203,14 +203,18 @@
|
|||||||
|
|
||||||
<app-contacts
|
<app-contacts
|
||||||
(openMessage)="openMessagesPage($event)"
|
(openMessage)="openMessagesPage($event)"
|
||||||
|
(backToChat)="backToChat($event)"
|
||||||
(emptyTextDescriptionOpen)="emptyTextDescriptionOpen()"
|
(emptyTextDescriptionOpen)="emptyTextDescriptionOpen()"
|
||||||
*ngIf="showContacts"
|
*ngIf="showContacts"
|
||||||
|
[roomId]="roomId"
|
||||||
[style.display]="showContacts ? 'flex' : 'none'"
|
[style.display]="showContacts ? 'flex' : 'none'"
|
||||||
class=" height-100 flex-column">
|
class=" height-100 flex-column">
|
||||||
</app-contacts>
|
</app-contacts>
|
||||||
|
|
||||||
<app-new-group
|
<app-new-group
|
||||||
(addGroupMessage)="openGroupContactsPage($event)"
|
(addGroupMessage)="openGroupContactsPage($event)"
|
||||||
|
[roomId]="roomId"
|
||||||
|
(backToChat)="backToChat($event)"
|
||||||
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
(closeAllDesktopComponents)="closeAllDesktopComponents()"
|
||||||
[style.display]="showNewGroup ? 'flex' : 'none'"
|
[style.display]="showNewGroup ? 'flex' : 'none'"
|
||||||
*ngIf="showNewGroup"
|
*ngIf="showNewGroup"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { HttpErrorResponse, HttpHeaders } from '@angular/common/http';
|
import { HttpErrorResponse, HttpHeaders } from '@angular/common/http';
|
||||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||||
import { ModalController } from '@ionic/angular';
|
import { ModalController } from '@ionic/angular';
|
||||||
import { AuthService } from 'src/app/services/auth.service';
|
import { AuthService } from 'src/app/services/auth.service';
|
||||||
import { ChatService } from 'src/app/services/chat.service';
|
import { ChatService } from 'src/app/services/chat.service';
|
||||||
@@ -22,9 +22,11 @@ export class ContactsPage implements OnInit {
|
|||||||
room:any;
|
room:any;
|
||||||
dm:any;
|
dm:any;
|
||||||
sessionStore = SessionStore
|
sessionStore = SessionStore
|
||||||
|
@Input() roomId: string;
|
||||||
|
|
||||||
@Output() openMessage:EventEmitter<any> = new EventEmitter<any>();
|
@Output() openMessage:EventEmitter<any> = new EventEmitter<any>();
|
||||||
@Output() emptyTextDescriptionOpen:EventEmitter<any> = new EventEmitter<any>();
|
@Output() emptyTextDescriptionOpen:EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
@Output() backToChat:EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
@@ -86,7 +88,7 @@ export class ContactsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
this.emptyTextDescriptionOpen.emit();
|
this.backToChat.emit({roomId: this.roomId});
|
||||||
}
|
}
|
||||||
|
|
||||||
clicked() {
|
clicked() {
|
||||||
|
|||||||
@@ -28,10 +28,12 @@ export class NewGroupPage implements OnInit{
|
|||||||
link = ''
|
link = ''
|
||||||
documents: any;
|
documents: any;
|
||||||
loggedUserChat: any;
|
loggedUserChat: any;
|
||||||
|
@Input() roomId: string;
|
||||||
|
|
||||||
@Input() groupName:string;
|
@Input() groupName:string;
|
||||||
@Output() addGroupMessage:EventEmitter<any> = new EventEmitter<any>();
|
@Output() addGroupMessage:EventEmitter<any> = new EventEmitter<any>();
|
||||||
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
|
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
@Output() backToChat:EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@@ -81,7 +83,7 @@ export class NewGroupPage implements OnInit{
|
|||||||
this.RouteService.goBack();
|
this.RouteService.goBack();
|
||||||
this.dataService.set("link", false);
|
this.dataService.set("link", false);
|
||||||
} else {
|
} else {
|
||||||
this.closeAllDesktopComponents.emit();
|
this.backToChat.emit({roomId: this.roomId});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user