fix change folder path

This commit is contained in:
Peter Maquiran
2024-08-16 14:21:01 +01:00
parent bec5104ac8
commit 6072a2456b
114 changed files with 419 additions and 540 deletions
@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ContactsPage } from './contacts.page';
const routes: Routes = [
{
path: '',
component: ContactsPage
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class ContactsPageRoutingModule {}
@@ -0,0 +1,25 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { ContactsPageRoutingModule } from './contacts-routing.module';
import { ContactsPage } from './contacts.page';
import { SharedModule } from 'src/app/shared/shared.module';
import { FilterPipe } from 'src/app/pipes/filter.pipe';
import { PipesModule } from 'src/app/pipes/pipes.module';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
ContactsPageRoutingModule,
PipesModule,
],
exports: [ContactsPage],
declarations: [ContactsPage]
})
export class ContactsPageModule {}
@@ -0,0 +1,49 @@
<ion-header class="ion-no-border">
<ion-toolbar class="header-toolbar">
<div class="main-header">
<div class="title-content">
<div class="back-icon cursor-pointer" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div class="div-title">
<!-- Desktop -->
<ion-label class="title">Nova Conversa</ion-label>
</div>
</div>
</div>
</ion-toolbar>
<ion-toolbar class="toolbar-search">
<div class="search">
<ion-searchbar search-icon="undefined" debounce="500" (ionChange)="onChange($event)" placeholder="Pesquisar por contacto" ></ion-searchbar>
</div>
</ion-toolbar>
</ion-header>
<ion-content>
<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">
<ion-progress-bar class="position-absolute" type="indeterminate" *ngIf="loading"></ion-progress-bar>
<ion-virtual-scroll [items]="userList" approxItemHeight="70px" [headerFn]="separateLetter">
<div class="item-divider" *virtualHeader="let header">
<ion-label>{{ header }}</ion-label>
</div>
<div (click)="openMessagesPage(user.wxFullName, user.wxUserId)" *virtualItem="let user" class="item-user cursor-pointer">
<p>{{ user.wxFullName }}</p>
<span class="icon">
<ion-icon [class]="user.status" slot="end" name="ellipse"></ion-icon>
</span>
</div>
</ion-virtual-scroll>
</div>
</ion-content>
@@ -0,0 +1,136 @@
@import '~src/function.scss';
.header-toolbar{
--background:transparent;
--opacity: 1;
.main-header{
width: 100%;
height: 100%;
font-family: Roboto;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
background-color: #fff;
overflow:hidden;
padding: 30px 20px 0px 20px;
color:#000;
transform: translate3d(0, 1px, 0);
.div-icon{
width: rem(40);
float: right;
font-size: rem(35);
overflow: auto;
padding: 1px;
}
.div-icon ion-icon{
float: right;
padding-left: 20px;
}
.title-content{
margin: 0px auto;
overflow: auto;
padding: 0 !important;
}
.back-icon{
width: 37px;
float: left;
font-size: rem(35);
overflow: auto;
}
.div-title{
width: 221px;
padding: 0!important;
float: left;
margin: 2.5px 0 0 5px;
}
.title{
font-size: rem(25);
}
}
}
.toolbar-search{
--padding-top:0 !important;
--padding-bottom:0 !important;
--padding-start:0 !important;
--padding-end:0 !important;
.search{
border: 1px solid #ebebeb;
margin: 5px 20px 5px 20px;
border-radius: 5px;
height: auto;
padding: 0 !important;
}
.search ion-searchbar{
/* border: 1px solid green; */
width: 100%;
margin: 0 !important;
padding: 0 !important;
--border-radius: 5px;
--box-shadow: none;
overflow: hidden;
--icon-color:var( --font-awesome);
}
}
ion-content{
--background:transparent;
}
.main-content{
width: 100%;
height: 100%;
font-family: Roboto;
margin: 0 auto;
background-color: #fff;
padding: 0 0 0 0;
overflow:auto;
.item-divider{
background: #ebebeb;
font-size: rem(15);
margin: 10px 0 10px 0;
padding:5px 0 5px 20px;
}
.item-user{
display: flex;
margin: 10px 20px 10px 20px !important;
overflow: auto;
align-items: center;
}
.item-user p{
display: block;
margin: 0 !important;
width: 90%;
font-size: rem(15);
color: var(--title-text-color);
float: left;
}
.item-user .icon{
width: 10%;
font-size: rem(10);
display: block;
text-align: right;
overflow: auto;
}
.online{
color:#99e47b;
}
.offline{
color:#cbced1;
}
.away{
color:#ffd21f;
}
.invisible{
color:#cbced1;
}
.busy{
color:#f5455c;
}
}
@@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { ContactsPage } from './contacts.page';
describe('ContactsPage', () => {
let component: ContactsPage;
let fixture: ComponentFixture<ContactsPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ContactsPage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(ContactsPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,201 @@
import { HttpHeaders } from '@angular/common/http';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { MessagesPage } from '../messages.page';
import { ThemeService } from 'src/app/services/theme.service'
// import { ChatSystemService } from 'src/app/services/chat/chat-system.service'
import { SessionStore } from 'src/app/store/session.service';
import { ContactRepositoryService } from 'src/app/services/Repositorys/contacts/repository/contacts-repository.service';
import { UserContacts } from 'src/app/services/Repositorys/contacts/data-source/contacts-data-source.service';
import { RoomRepositoryService } from 'src/app/module/chat/data/repository/room-repository.service'
import { HttpErrorResponse } from '@angular/common/http';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { ToastService } from 'src/app/services/toast.service';
class UserToSelect {
}
@Component({
selector: 'app-contacts',
templateUrl: './contacts.page.html',
styleUrls: ['./contacts.page.scss'],
})
export class ContactsPage implements OnInit {
loggedUser: any;
headers: HttpHeaders;
options: any;
textSearch: string;
room: any;
dm: any;
sessionStore = SessionStore
loading = false
@Input() roomId: string;
@Output() openMessage: EventEmitter<any> = new EventEmitter<any>();
@Output() emptyTextDescriptionOpen: EventEmitter<any> = new EventEmitter<any>();
@Output() backToChat: EventEmitter<any> = new EventEmitter<any>();
@Output() closeAllDesktopComponents: EventEmitter<any> = new EventEmitter<any>();
userList: UserContacts[];
originalUserList: any[] = [];
CoolList = []
constructor(
private modalController: ModalController,
public ThemeService: ThemeService,
// public ChatSystemService: ChatSystemService,
private contactsRepositoryService: ContactRepositoryService,
private roomRepositoryService: RoomRepositoryService,
private httpErrorHandle: HttpErrorHandle,
private toastService: ToastService,
) {
this.loggedUser = SessionStore.user.ChatData['data'];
this.textSearch = "";
this.dm = null;
this.room = null;
}
async ngOnInit() {
this.loadUsers();
}
onChange(event) {
this.textSearch = event.detail.value.toLowerCase();
this.userList = this.originalUserList.filter((e) => {
const username = e.wxFullName.toLowerCase();
return username.includes(this.textSearch);
});
this.userList.sort((a, b) => a.wxFullName.toLowerCase().localeCompare(b.wxFullName.toLowerCase()));
}
openMessagesPage(username: string, wxUserId: number) {
this.createRoom(username, wxUserId);
/* if (window.innerWidth < 701) {
this.createRoom(username);
}
else {
let body = {
username: username,
}
this.loading = true
this.chatService.createRoom(body).subscribe(res => {
this.room = res['room'];
this.ChatSystemService.getAllRooms(() => {
this.openMessage.emit(this.room._id);
this.loading = false
}, this.room._id);
}, () => {
this.loading = false
});
}*/
}
async loadUsers() {
try {
let users = await this.contactsRepositoryService.getUsers();
if (users.isOk()) {
const userData = users.value.data.result;
console.log(userData)
this.originalUserList = userData;
this.userList = [...this.originalUserList];
this.userList.sort((a, b) => a.wxFullName.toLowerCase().localeCompare(b.wxFullName.toLowerCase()));
console.log('User data loaded successfully:', this.originalUserList);
} else {
console.error('Failed to fetch users:', users.error);
}
this.loading = false;
} catch (error) {
console.error('Error loading users', error);
this.loading = false;
}
}
separateLetter(record, recordIndex, records) {
const normalize = (str) => str.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
if (recordIndex == 0) {
return normalize(record.wxFullName[0]).toUpperCase();
}
let firstPrev = normalize(records[recordIndex - 1].wxFullName[0]).toUpperCase();
let firstCurrent = normalize(record.wxFullName[0]).toUpperCase();
if (firstPrev !== firstCurrent) {
return firstCurrent;
}
return null;
}
doRefresh(event) {
}
close() {
if (this.roomId) {
this.backToChat.emit({ roomId: this.roomId });
} else {
this.closeAllDesktopComponents.emit();
}
}
clicked() {
}
async createRoom(username: string, wxUserId: number) {
const result = await this.roomRepositoryService.create({
roomName: username,
createdBy: SessionStore.user.UserId,
roomType: 0,
expirationDate: null,
members: [wxUserId]
})
console.log(result)
if(result.isOk()) {
this.openMessage.emit(result.value.data.id);
} else if(result.error instanceof HttpErrorResponse) {
this.httpErrorHandle.httpStatusHandle(result.error)
} else {
this.toastService._badRequest("Pedimos desculpa mas não foi possível executar a acção. Por favor, contacte o apoio técnico.")
console.log(result.error)
}
/* this.chatService.createRoom(body).subscribe(res => {
this.room = res['room'];
this.openMessagesModal(this.room._id);
this.ChatSystemService.getAllRooms()
}); */
}
async openMessagesModal(roomId: any) {
const modal = await this.modalController.create({
component: MessagesPage,
cssClass: 'modal modal-desktop isMessagesChatOpened',
componentProps: {
roomId: roomId,
},
});
modal.onDidDismiss();
await modal.present();
}
}
@@ -0,0 +1,21 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { MessagesPage } from './messages.page';
const routes: Routes = [
{
path: '',
component: MessagesPage
},
{
path: 'contacts',
loadChildren: () => import('./contacts/contacts.module').then( m => m.ContactsPageModule)
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
@@ -0,0 +1,33 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { MessagesPageRoutingModule } from './messages-routing.module';
import { MessagesPage } from './messages.page';
import { SharedModule } from 'src/app/shared/shared.module';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { MatButtonModule } from '@angular/material/button';
import {MatMenuModule} from '@angular/material/menu';
import { LettersAvatarModule } from "ngx-letters-avatar";
import { PipesModule } from 'src/app/pipes/pipes.module';
import { SafehtmlPipe } from 'src/app/pipes/safehtml.pipe';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
FontAwesomeModule,
MessagesPageRoutingModule,
MatButtonModule,
MatMenuModule,
LettersAvatarModule,
PipesModule,
],
exports: [MessagesPage],
declarations: [MessagesPage]
})
export class MessagesPageModule {}
@@ -0,0 +1,223 @@
<ion-header class="ion-no-border" >
<ion-toolbar class="header-toolbar" >
<div class="main-header" *ngIf="roomData$ | async as roomData">
<div class="header-top">
<div class="middle" >
<ion-label class="title"> {{ roomData.roomName }}</ion-label>
<!-- <button (click)="ChatMessageDebuggingPage()">Dev</button> -->
<span *ngIf="roomStatus$ | async as roomStatus"><ion-icon *ngIf="roomStatus" class="online" name="ellipse"></ion-icon></span>
</div>
<div class="right">
<button title="Menu" class="btn-no-color" (click)="_openMessagesOptions()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/theme/blue/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg">
</ion-icon>
</button>
</div>
</div>
<div class="d-flex header-bottom" >
<div class="header-bottom-icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/icon/icons-user.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/icon/theme/gov/icons-user.svg"></ion-icon>
</div>
<ion-list class="header-bottom-contacts" *ngIf="roomMembers$ | async as memberList">
<ng-container *ngFor="let user of memberList; let i = index">
{{ user.wxFullName }}<ng-container *ngIf="i < memberList.length - 1">, </ng-container>
</ng-container>
</ion-list>
</div>
</div>
<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>
</ion-toolbar>
</ion-header>
<ion-content >
<div class="messages height-100 width-100 d-flex flex-column" #scrollMe >
<div
*ngFor="let message of messages1[roomId]" class="messages-list-item-wrapper"
[ngClass]="{'my-message': message.sender.wxUserId === sessionStore.user.UserId, 'other-message': message.sender.wxUserId !== sessionStore.user.UserId}"
>
<div class="message-container">
<div class="d-flex justify-content-between">
<div>
<div>
{{ message.message }}
</div>
<div *ngFor="let attachment of message.attachments; let i = index">
<div *ngIf="attachment.source == MessageAttachmentFileSource.Webtrix">
<ion-icon src="assets/icon/webtrix.svg" class="file-icon font-25"></ion-icon>
<ion-label>{{ attachment.fileName}}</ion-label>
<!-- <ion-icon *ngIf="ThemeService.currentTheme == 'default' && attachment.type != 'webtrix' && !( msg.downloadLoader == true || msg.uploadingFile == true ) " class="icon-download" src="assets/icon/theme/default/icons-download.svg" slot="end"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && attachment.type != 'webtrix' && !( msg.downloadLoader == true || msg.uploadingFile == true ) " class="icon-download" src="assets/icon/theme/gov/icons-download.svg" slot="end"></ion-icon>
<ion-icon *ngIf="( msg.downloadLoader == true || msg.uploadingFile == true )" class="icon-download" src="assets/gif/theme/{{ThemeService.currentTheme}}/Blocks-loader.svg" slot="end"></ion-icon> -->
</div>
<div *ngIf="attachment.fileType == MessageAttachmentFileType.Image">
<img [src]="attachment.safeFile">
</div>
<div *ngIf="attachment.fileType == MessageAttachmentFileType.Audio">
<audio [src]="attachment.safeFile|safehtml" preload="metadata" class="flex-grow-1" controls controlsList="nodownload noplaybackrate"></audio>
</div>
<div *ngIf="attachment.fileType == MessageAttachmentFileType.Doc">
<fa-icon *ngIf="attachment.mimeType == 'application/pdf'" icon="file-pdf" class="pdf-icon"></fa-icon>
<fa-icon *ngIf="attachment.mimeType == 'application/word'" icon="file-word" class="word-icon">
</fa-icon>
<fa-icon *ngIf="attachment.mimeType == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'" icon="file-word" class="word-icon"></fa-icon>
<fa-icon
*ngIf="attachment.mimeType == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'"
icon="file-word" class="excel-icon"></fa-icon>
<ion-icon *ngIf="attachment.mimeType == 'application/webtrix'" src="assets/icon/webtrix.svg">
</ion-icon>
<ion-icon *ngIf="attachment.mimeType == 'application/meeting'" src="assets/icon/webtrix.svg">
</ion-icon>
<ion-label>{{ attachment.fileName}}</ion-label>
</div>
</div>
</div>
<div>
<div class="message-item-options d-flex justify-content-end">
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer"></fa-icon>
<mat-menu #beforeMenu="matMenu" xPosition="before">
<button (click)="messageDelete(message)" class="menuButton">Apagar mensagem</button>
<button (click)="editMessage(message)" class="menuButton">Editar mensagem</button>
<button (click)="toggleEmojiPicker(message)" class="menuButton">Reagir mensagem</button>
</mat-menu>
</div>
</div>
</div>
<div style="text-align: end;">
<div *ngIf="message.messageStatus != 'send'" style="font-size: .6875rem;">A enviar</div>
<div *ngIf="message.messageStatus == 'send'" style="font-size: .6875rem;">Enviado</div>
</div>
<!-- Emoji Picker -->
<div *ngIf="selectedMessage === message" class="emoji-picker" [ngStyle]="{'bottom': '0', 'right': '0'}">
<span *ngFor="let emoji of emojis" (click)="addReaction(message, emoji)" class="emoji-icon">
{{ emoji }}
</span>
</div>
</div>
<!-- current emoji -->
<div>
<span *ngFor="let reaction of message.reactions" class="emoji-icon">
{{ reaction.reaction }}
</span>
</div>
</div>
</div>
<ion-fab horizontal="start" vertical="bottom" slot="fixed">
<div #array>
</div>
</ion-fab>
</ion-content>
<!-- <ion-footer (click)="ChatSystemService.getDmRoom(roomId).sendReadMessage()"> -->
<ion-footer >
<!-- <div class="typing" *ngIf="ChatSystemService.getDmRoom(roomId).otherUserType == true" >
<ngx-letters-avatar *ngIf="showAvatar"
[avatarName]= "ChatSystemService.getDmRoom(roomId).name"
[width]="30"
[circular]="true"
fontFamily="Roboto"></ngx-letters-avatar>
está a escrever...
</div> -->
<div class="width-100 pl-20 pr-20">
<span >{{durationDisplay}}</span>
<div class=" audioDiv d-flex width-100 mt-10 mb-10" *ngIf="lastAudioRecorded">
<div (click)="start(audioRecordedSafe)" *ngIf="!isPlaying" > <ion-icon slot="icon-only" name="play"></ion-icon> </div>
<div (click)="togglePlayer(isPlaying)" *ngIf="isPlaying"> <ion-icon slot="icon-only" name="pause"></ion-icon> </div>
<ion-range #range [(ngModel)]="audioProgress" max="100" (mouseup)="seek()"></ion-range>
</div>
</div>
<div class="container width-100 d-flex">
<div>
<ion-fab *ngIf="!recording && !lastAudioRecorded && allowTyping" horizontal="start" vertical="bottom" slot="fixed">
<ion-fab-button color="light" size="small">
<ion-icon name="add"></ion-icon>
</ion-fab-button>
<ion-fab-list side="top">
<!-- <ion-fab-button *ngIf="p.userPermission([p.permissionList.Agenda.access])" title="Nova Reunião" (click)="bookMeeting()" color="light">
<ion-icon name="calendar"></ion-icon>
</ion-fab-button> -->
<ion-fab-button title="Adicionar Documento" (click)="addFile()" color="light">
<ion-icon name="document"></ion-icon>
</ion-fab-button>
<ion-fab-button title="Anexar Fotografia" (click)="pickPicture()" color="light">
<ion-icon name="image"></ion-icon>
</ion-fab-button>
<ion-fab-button title="Tirar Fotografia" (click)="takePictureMobile()" color="light">
<ion-icon name="camera"></ion-icon>
</ion-fab-button>
<ion-fab-button title="Documento da Gestão Documental" (click)="addFileWebtrix()" color="light">
<ion-icon src="assets/icon/webtrix.svg"></ion-icon>
</ion-fab-button>
</ion-fab-list>
</ion-fab>
<button *ngIf="recording || lastAudioRecorded || !allowTyping" class="btn-no-color" (click)="deleteRecording()">
<fa-icon class="icon-size-27" icon="trash"></fa-icon>
</button>
</div>
<div class="width-100">
<div *ngIf="!recording && !lastAudioRecorded" class="type-message">
<ion-textarea *ngIf="allowTyping" (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="textField" (ionChange)="sendTyping()" (click)="sendReadAt()"></ion-textarea>
</div>
<div *ngIf="recording" class="d-flex align-items-center justify-content-center">
<button (click)="stopRecording()" class="btn-no-color d-flex align-items-center justify-content-center">
<ion-icon class="icon-size-45" name="stop-circle-outline" color="danger"></ion-icon>
</button>
</div>
</div>
<div class="btn-send">
<button #recordbtn *ngIf="textField == '' && !lastAudioRecorded" (click)="startRecording()" class="btn-no-color">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/default/icons-chat-record-audio.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-record-audio.svg"></ion-icon>
</button>
<button *ngIf="textField != ''" class="btn-no-color" (click)="sendMessage()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button>
<button *ngIf="textField == '' && lastAudioRecorded" class="btn-no-color" (click)="sendAudio(lastAudioRecorded)">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button>
</div>
</div>
</ion-footer>
@@ -0,0 +1,466 @@
@import "~src/function.scss";
.header-toolbar {
--background: transparent;
--opacity: 1;
.main-header {
width: 100%;
/* 400px */
height: 100%;
font-family: Roboto;
background-color: #fff;
overflow: hidden;
//padding: 0px 20px 0px 20px;
color: #000;
transform: translate3d(0, 1px, 0);
padding: 30px 20px 0 20px !important;
.header-top {
width: 100%;
overflow: auto;
//padding: 0 !important;
background: #fff;
.middle {
//padding: 0!important;
float: left;
width: calc(100% - 77px);
margin: 2px 0 0 5px;
display: flex;
align-items: center;
}
.right {
padding: 0 !important;
float: right;
font-size: rem(25);
color: #0782c9;
margin: 5px 0 0 0;
}
}
.header-bottom {
width: 95%;
overflow: auto;
.header-bottom-icon {
width: rem(30);
font-size: rem(25);
padding: 2px;
}
.header-bottom-contacts {
font-size: rem(15);
color: #797979;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 5px;
margin: 1px;
}
}
.title {
font-size: rem(25);
white-space: nowrap;
overflow: hidden !important;
text-overflow: ellipsis !important;
float: left;
}
.div-icon {
width: rem(40);
float: right;
font-size: rem(35);
overflow: auto;
padding: 1px;
}
.div-icon ion-icon {
float: right;
padding-left: 20px;
}
}
}
ion-content {
width: 100%;
height: 100%;
padding: 30px 20px 0 20px !important;
.welcome-text {
/* width: 322px; */
/* width: em(422px); */
width: 100%;
background: #ebebeb;
text-align: center;
font-size: rem(13);
color: #797979;
padding: 10px;
margin: 0 auto !important;
line-height: 1.2rem;
//margin: 20px 39px 25px;
border-radius: 8px;
border: 1px solid red;
}
.info-meeting {
/* width: 322px; */
width: em(422px);
background: var(--chat-alert-msg-color);
text-align: center;
font-size: rem(13);
color: #262420;
padding: 10px;
margin: 10px auto;
line-height: 1.2rem;
/* margin: 15px 0px 15px 0px; */
border-radius: 8px;
.info-meeting-small {
font-size: rem(10);
font-style: italic;
}
.info-meeting-medium {
font-size: rem(12);
}
.info-meeting-normal {
font-weight: 700;
}
.info-meeting-normal:hover {
text-decoration: underline;
color: #0782c9;
}
}
.messages {
font-size: rem(13);
font-family: Roboto;
overflow: auto;
//set scroll do bottom
// position: absolute;
// top: 0;
// left: 0;
// overflow-x: hidden;
// overflow-y: auto;
// width: 100%;
// height: 100%;
// word-wrap: break-word;
// -webkit-overflow-scrolling: touch;
.other-message,
.my-message {
.message-container {
padding: 15px 20px;
margin: 10px 20px 10px 75px;
background: var(--chat-incoming-msg-color);
border-radius: 10px;
}
}
.other-message {
display: flex;
/* justify-content: flex-end; */
align-items: start;
flex-direction: column;
// float: left;
// Styles for incoming messages from other users
justify-content: flex-start;
.message-container {
padding: 15px 20px;
margin: 10px 75px 10px 20px;
background: #ebebeb;
border-radius: 10px;
}
}
}
.my-message {
display: flex;
/* justify-content: flex-end; */
align-items: end;
flex-direction: column;
}
.message-bubble {
// Styles for the message bubble
background-color: #e2e2e2; // Example background color
padding: 10px; // Adjust as needed
border-radius: 10px; // Adjust as needed
}
.title {
display: inline;
color: var(--title-text-color);
font-weight: bold;
margin-bottom: 5px;
.time {
color: #797979;
text-align: right;
margin-left: 10px;
float: right;
}
}
.message {
.message-attachments {
.file {
align-items: center;
.file-details {
width: 100%;
.file-title {
color: #000;
text-decoration: underline;
white-space: nowrap;
overflow: hidden !important;
text-overflow: ellipsis !important;
}
.file-title:hover {
color: #0782c9;
}
}
}
}
}
}
ion-footer {
padding-top: 7.5px;
padding-bottom: 7.5px;
.container {
justify-content: center;
justify-content: space-evenly;
align-items: center;
}
.chat-icon-options {
display: block !important;
font-size: rem(35);
float: right !important;
margin-top: 5px;
}
.chat-icon-send {
font-size: rem(45);
margin: 0 auto;
margin-top: 4px;
}
.chat-icon-download {
font-size: 95px;
margin: 0 auto;
margin-top: 4px;
border: 1px solid red;
}
.type-message {
display: flex;
border: 1px solid #ebebeb;
border-radius: 25px;
padding-left: 15px;
margin: 0 15px 0 60px;
align-items: center;
overflow: auto;
ion-textarea {
margin: 0 !important;
align-self: center;
}
}
}
.text-color-blue {
font-size: rem(15);
color: #0782c9;
font-weight: 500;
letter-spacing: normal;
}
.user-status-online {
display: block;
float: left;
color: #99e47b;
padding-left: 10px;
}
.online {
display: block;
float: left;
color: #99e47b;
padding-left: 10px;
}
.offline {
color: #cbced1;
display: block;
float: left;
padding-left: 10px;
}
.away {
color: #ffd21f;
display: block;
float: left;
padding-left: 10px;
}
.invisible {
color: #cbced1;
display: block;
float: left;
padding-left: 10px;
}
.busy {
color: #f5455c;
display: block;
float: left;
padding-left: 10px;
}
.float-status {
position: relative !important;
float: right;
display: flex;
align-items: self-end;
}
.float-status-image {
position: relative !important;
float: right;
display: flex;
align-items: self-end;
top: -15px;
}
.float-status-webtrix {
position: relative !important;
top: 0px !important;
float: right;
display: flex;
align-items: self-end;
}
.float-status-all {
font-size: 10pt !important;
}
.typing {
position: relative;
top: -25px;
height: 0px;
left: 0px;
margin-left: 22px;
display: flex;
font-size: rem(12);
align-items: center;
}
.typing ngx-letters-avatar {
padding-right: 5px;
}
.div-do-audio {
border: 1px solid red !important;
overflow: auto;
}
.message-box {
flex: auto;
margin-right: 9px;
}
.divColor {
color: #000;
width: 10ch;
height: 10ch;
}
.audioDiv {
border-radius: 25px;
background: #cbced1;
padding: 20px;
height: 50px;
}
.audioButtonPlay {
margin-bottom: 100%;
right: 50%;
}
.try {
color: red;
background: #f3414159;
padding: 6px;
border-radius: 10px;
cursor: pointer;
}
.red-top {
border-top: 1px solid red !important;
}
.red {
color: red !important;
}
.lido,
.enviado {
font-size: rem(11);
}
.dateLabel {
background: #ebebeb !important;
float: unset !important;
margin: 0px auto !important;
width: 111px !important;
text-align: center;
}
.message-item-options {
//display: none !important; /* Hide the options by default */
opacity: 0 !important;
}
.message-container:hover .message-item-options {
//display: block !important; /* Show the options on hover */
opacity: 1 !important;
}
.message-item-options {
position: relative;
}
.emoji-picker {
display: flex;
flex-wrap: wrap;
background: white;
border: 1px solid #ccc;
padding: 5px;
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
}
.emoji-icon {
font-size: 20px;
cursor: pointer;
margin: 2px;
}
@@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { MessagesPage } from './messages.page';
describe('MessagesPage', () => {
let component: MessagesPage;
let fixture: ComponentFixture<MessagesPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MessagesPage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(MessagesPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
File diff suppressed because it is too large Load Diff