mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
improvements
This commit is contained in:
@@ -33,18 +33,17 @@ ion-content{
|
||||
|
||||
|
||||
.main-content{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-family: Roboto;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
border-top-left-radius: 25px;
|
||||
border-top-right-radius: 25px;
|
||||
|
||||
overflow: auto;
|
||||
|
||||
.aside-wrapper{
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
padding: 30px 20px 0 20px !important;
|
||||
}
|
||||
|
||||
.iconschatnew-group{
|
||||
@@ -109,8 +108,7 @@ ion-content{
|
||||
|
||||
|
||||
.aside-wrapper{
|
||||
width: 40%;
|
||||
padding: 30px 20px 0 20px !important;
|
||||
width: 35%;
|
||||
border-right: 1px solid #d8d8d8;
|
||||
.aside-title{
|
||||
font-size: 25px;
|
||||
@@ -120,7 +118,7 @@ ion-content{
|
||||
width: 340px;
|
||||
} */
|
||||
.aside-content{
|
||||
width: 60%;
|
||||
width: 65%;
|
||||
display: flex !important;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ export class ChatPage implements OnInit {
|
||||
this.closeAllDesktopComponents();
|
||||
|
||||
if( window.innerWidth <= 1024){
|
||||
//this.selectContact();
|
||||
this.selectContact();
|
||||
}
|
||||
else{
|
||||
console.log('here');
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="members-checkbox">
|
||||
<ion-checkbox checked color="primary"></ion-checkbox>
|
||||
<p>{{user.name}}</p>
|
||||
<ion-icon name="ellipse"></ion-icon>
|
||||
<ion-icon class="{{user.status}}" name="ellipse"></ion-icon>
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
@@ -50,7 +50,7 @@
|
||||
<div *virtualItem="let user" class="item-checkbox">
|
||||
<ion-checkbox (ionChange)="selectedContact(user)" color="primary"></ion-checkbox>
|
||||
<p>{{user.name}}</p>
|
||||
<ion-icon name="ellipse"></ion-icon>
|
||||
<ion-icon class="{{user.status}}" name="ellipse"></ion-icon>
|
||||
</div>
|
||||
|
||||
</ion-virtual-scroll>
|
||||
|
||||
@@ -136,6 +136,21 @@
|
||||
color:#99e47b;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.online{
|
||||
color:#99e47b !important;
|
||||
}
|
||||
.offline{
|
||||
color:#cbced1 !important;
|
||||
}
|
||||
.away{
|
||||
color:#ffd21f !important;
|
||||
}
|
||||
.invisible{
|
||||
color:#cbced1 !important;
|
||||
}
|
||||
.busy{
|
||||
color:#f5455c !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
<!-- </ion-content>
|
||||
<ion-footer>
|
||||
<ion-toolbar>
|
||||
<ion-row align-items-center class="row">
|
||||
@@ -66,11 +66,27 @@
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
<ion-col size="2">
|
||||
<!-- [disabled]="message === ''" -->
|
||||
<ion-label>
|
||||
<ion-icon (click)="sendMessage()" class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
|
||||
</ion-label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-toolbar>
|
||||
</ion-footer> -->
|
||||
|
||||
<ion-footer>
|
||||
<div class="container width-100 d-flex">
|
||||
<div>
|
||||
<ion-icon (click)="openChatOptions()" class="chat-icon-options" src="assets/icon/icons-chat-options.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="width-80">
|
||||
<ion-item class="ion-no-padding type-message" lines="none">
|
||||
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div>
|
||||
<ion-icon (click)="sendMessage()" class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</ion-footer>
|
||||
|
||||
@@ -137,38 +137,57 @@
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.online{
|
||||
color:#99e47b !important;
|
||||
}
|
||||
.offline{
|
||||
color:#cbced1 !important;
|
||||
}
|
||||
.away{
|
||||
color:#ffd21f !important;
|
||||
}
|
||||
.invisible{
|
||||
color:#cbced1 !important;
|
||||
}
|
||||
.busy{
|
||||
color:#f5455c !important;
|
||||
}
|
||||
}
|
||||
|
||||
ion-footer{
|
||||
.row{
|
||||
width: 380px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
padding-top: 7.5px;
|
||||
padding-bottom: 7.5px;
|
||||
.container{
|
||||
justify-content: center;
|
||||
justify-content: space-evenly;
|
||||
|
||||
}
|
||||
|
||||
.chat-icon-options{
|
||||
display:block !important;
|
||||
font-size: 25px;
|
||||
float: right !important;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.chat-icon-options{
|
||||
display:block !important;
|
||||
font-size: 25px;
|
||||
float: right !important;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.chat-icon-send{
|
||||
font-size: 45px;
|
||||
margin: 0 auto;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.chat-icon-send{
|
||||
font-size: 45px;
|
||||
margin: 0 auto;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.type-message{
|
||||
display: flex;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 25px;
|
||||
padding-left: 15px;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 25px;
|
||||
padding-left: 15px;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
|
||||
ion-textarea{
|
||||
margin: 0 !important;
|
||||
align-self: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
ion-textarea{
|
||||
margin: 0 !important;
|
||||
align-self: center;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -44,7 +44,8 @@
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
|
||||
<!-- <ion-footer>
|
||||
<ion-toolbar>
|
||||
<ion-row align-items-center class="row">
|
||||
<ion-col size="1">
|
||||
@@ -59,11 +60,27 @@
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
<ion-col size="2">
|
||||
<!-- [disabled]="message === ''" -->
|
||||
<ion-label>
|
||||
<ion-icon (click)="sendMessage()" class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
|
||||
</ion-label>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-toolbar>
|
||||
</ion-footer> -->
|
||||
|
||||
<ion-footer>
|
||||
<div class="container width-100 d-flex">
|
||||
<div>
|
||||
<ion-icon (click)="openChatOptions()" class="chat-icon-options" src="assets/icon/icons-chat-options.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="width-70">
|
||||
<ion-item class="ion-no-padding ion-no-margin type-message" lines="none">
|
||||
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div>
|
||||
<ion-icon (click)="sendMessage()" class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</ion-footer>
|
||||
@@ -150,39 +150,43 @@
|
||||
}
|
||||
|
||||
ion-footer{
|
||||
.row{
|
||||
width: 380px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.chat-icon-options{
|
||||
display:block !important;
|
||||
font-size: 25px;
|
||||
float: right !important;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.chat-icon-send{
|
||||
font-size: 45px;
|
||||
margin: 0 auto;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.type-message{
|
||||
display: flex;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 25px;
|
||||
padding-left: 15px;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
|
||||
ion-textarea{
|
||||
margin: 0 !important;
|
||||
align-self: center;
|
||||
}
|
||||
}
|
||||
|
||||
padding-top: 7.5px;
|
||||
padding-bottom: 7.5px;
|
||||
.container{
|
||||
justify-content: center;
|
||||
justify-content: space-evenly;
|
||||
|
||||
}
|
||||
|
||||
.chat-icon-options{
|
||||
display:block !important;
|
||||
font-size: 25px;
|
||||
float: right !important;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.chat-icon-send{
|
||||
font-size: 45px;
|
||||
margin: 0 auto;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.type-message{
|
||||
display: flex;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 25px;
|
||||
padding-left: 15px;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
|
||||
ion-textarea{
|
||||
margin: 0 !important;
|
||||
align-self: center;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.text-color-blue{
|
||||
font-size: 15px;
|
||||
|
||||
@@ -19,21 +19,21 @@
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-content class="width-100">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div class="main-content">
|
||||
<div *ngIf="members">
|
||||
<div class="main-content width-100">
|
||||
<div class="members" *ngIf="members">
|
||||
<ion-label class="members-label">Contactos selecção:</ion-label>
|
||||
<ion-list class="members-list" *ngFor="let user of members">
|
||||
<div class="members-checkbox">
|
||||
<ion-checkbox checked color="primary"></ion-checkbox>
|
||||
<p>{{user.name}}</p>
|
||||
<ion-icon name="ellipse"></ion-icon>
|
||||
<ion-icon class="{{user.status}}" name="ellipse"></ion-icon>
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
@@ -47,7 +47,7 @@
|
||||
<div *virtualItem="let user" class="item-checkbox">
|
||||
<ion-checkbox (ionChange)="selectedContact(user)" color="primary"></ion-checkbox>
|
||||
<ion-label>{{user.name}}</ion-label>
|
||||
<div class="icon"><ion-icon name="ellipse"></ion-icon></div>
|
||||
<div class="icon"><ion-icon class="{{user.status}}" name="ellipse"></ion-icon></div>
|
||||
</div>
|
||||
|
||||
</ion-virtual-scroll>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
|
||||
.main-content{
|
||||
width: 100%;
|
||||
//width: 100%;
|
||||
height: 100%;
|
||||
font-family: Roboto;
|
||||
margin: 0 auto;
|
||||
@@ -81,15 +81,24 @@
|
||||
padding: 0 0 0 0;
|
||||
overflow:auto;
|
||||
|
||||
.members{
|
||||
padding: 15px 20px 0 20px !important;
|
||||
|
||||
.members-list{
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.members-label{
|
||||
margin: 10px 20px 10px 20px !important;
|
||||
//margin: 10px 20px 10px 20px !important;
|
||||
/* font-size: 15px; */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.members-checkbox{
|
||||
display: flex;
|
||||
margin: .5px 20px .5px 20px !important;
|
||||
//margin: 0px 20px 0px 20px !important;
|
||||
overflow: auto;
|
||||
align-items: center;
|
||||
|
||||
@@ -124,8 +133,22 @@
|
||||
}
|
||||
.icon, .members-checkbox ion-icon{
|
||||
font-size: 10px;
|
||||
color:#99e47b;
|
||||
}
|
||||
.online{
|
||||
color:#99e47b !important;
|
||||
}
|
||||
.offline{
|
||||
color:#cbced1 !important;
|
||||
}
|
||||
.away{
|
||||
color:#ffd21f !important;
|
||||
}
|
||||
.invisible{
|
||||
color:#cbced1 !important;
|
||||
}
|
||||
.busy{
|
||||
color:#f5455c !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,18 +56,46 @@ export class GroupContactsPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
//this.getRoomInfo();
|
||||
this.loadUsers();
|
||||
//this.loadUsers();
|
||||
console.log(this.roomId);
|
||||
this.getChatInfo();
|
||||
//console.log(this.isGroupCreated);
|
||||
}
|
||||
|
||||
getChatInfo(){
|
||||
console.log('HERE');
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
console.log('HERE 2');
|
||||
console.log(room['room']);
|
||||
this.getGroupContacts(room['room']);
|
||||
});
|
||||
}
|
||||
|
||||
getGroupContacts(room:any){
|
||||
this.showLoader = true;
|
||||
if(room.t === 'p'){
|
||||
this.chatService.getGroupMembers(this.roomId).subscribe(res=>{
|
||||
this.members = res['members'];
|
||||
this.loadUsers1(this.members);
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.chatService.getChannelMembers(this.roomId).subscribe(res=>{
|
||||
this.members = res['members'];
|
||||
this.loadUsers1(this.members);
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
updateGroup(){
|
||||
this.showLoader = true;
|
||||
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
|
||||
this.room = room['room'];
|
||||
this.addContacts(this.room);
|
||||
this.showLoader = false;
|
||||
this.openGroupMessage.emit(this.room._id)
|
||||
this.openGroupMessage.emit(this.room._id);
|
||||
});
|
||||
}
|
||||
openGroupMessagesPage(){
|
||||
@@ -76,11 +104,44 @@ export class GroupContactsPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
loadUsers1(members:any){
|
||||
this.options = {
|
||||
headers: this.headers,
|
||||
};
|
||||
this.chatService.getAllUsers().subscribe((res:any)=>{
|
||||
|
||||
|
||||
|
||||
if(members){
|
||||
this.contacts = res.users.filter(f => !this.members.some(item => item._id === f._id));
|
||||
}
|
||||
else{
|
||||
this.contacts = res.users.filter(data => data.username != this.loggedUser.me.username);
|
||||
}
|
||||
|
||||
this.users = this.contacts.sort((a,b) => {
|
||||
if(a.name < b.name){
|
||||
return -1;
|
||||
}
|
||||
if(a.name > b.name){
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
console.log(this.users);
|
||||
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
|
||||
loadUsers(){
|
||||
this.options = {
|
||||
headers: this.headers,
|
||||
};
|
||||
this.chatService.getAllUsers().subscribe((res:any)=>{
|
||||
|
||||
|
||||
|
||||
if(this.members){
|
||||
this.contacts = res.users.filter(f => !this.members.some(item => item._id === f._id));
|
||||
}
|
||||
@@ -146,16 +207,16 @@ export class GroupContactsPage implements OnInit {
|
||||
onChange(event){
|
||||
this.textSearch = event.detail.value;
|
||||
}
|
||||
|
||||
clicked(){
|
||||
console.log('clicked');
|
||||
|
||||
}
|
||||
|
||||
selectedContact(user:any){
|
||||
/* this.groupName = this.room.name; */
|
||||
user.isChecked = !user.isChecked;
|
||||
|
||||
|
||||
}
|
||||
|
||||
addContacts(room:any){
|
||||
console.log(room);
|
||||
this.selectedUserList = this.users.filter(function(contact) {
|
||||
|
||||
@@ -42,8 +42,8 @@ export class ContactsPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.loadUsers();
|
||||
|
||||
}
|
||||
|
||||
onChange(event){
|
||||
this.textSearch = event.detail.value;
|
||||
}
|
||||
@@ -70,6 +70,7 @@ export class ContactsPage implements OnInit {
|
||||
};
|
||||
this.chatService.getAllUsers().subscribe((res:any)=>{
|
||||
console.log(res.users);
|
||||
//this.contacts = res.users.filter(data => data.username != this.loggedUser.me.username);
|
||||
this.contacts = res.users.filter(data => data.username != this.loggedUser.me.username);
|
||||
this.users = this.contacts.sort((a,b) => {
|
||||
if(a.name < b.name){
|
||||
|
||||
Reference in New Issue
Block a user