2020-12-30 11:13:50 +01:00
< ion-header class = "ion-no-border" >
< ion-toolbar class = "header-toolbar" >
2021-09-30 08:43:49 +01:00
<!-- <div #rectangle class="rectangle" (press)="handlePress()">
Double click me to change the color
</div> -->
2020-12-30 11:13:50 +01:00
< div class = "main-header" >
< div class = "header-top" >
2021-03-12 11:56:54 +01:00
< div class = "left" >
2021-04-11 07:05:39 +01:00
< button class = "btn-no-color" ( click ) = " close ( ) " >
< ion-icon slot = "end" src = 'assets/images/icons-arrow-arrow-left.svg' > < / ion-icon >
< / button >
2021-03-12 11:56:54 +01:00
< / div >
2021-09-30 08:43:49 +01:00
< div class = "middle-container" * ngIf = "!showMessageOptions" >
< div class = "middle" * ngFor = "let users of dmUsers" >
< ion-label class = "title" > {{users.name}}< / ion-label >
< span > < ion-icon class = "{{users.status}}" name = "ellipse" > < / ion-icon > < / span >
< / div >
< / div >
< div class = "middle-container-options" * ngIf = "showMessageOptions" >
< fa-icon icon = "trash" class = "middle-container-options-icons" > < / fa-icon >
<!-- <ion - icon name="trash"></ion - icon> -->
2020-12-30 11:13:50 +01:00
< / div >
2021-08-20 15:08:36 +01:00
< div hidden class = "right" >
2021-04-11 07:05:39 +01:00
< button class = "btn-no-color" ( click ) = " openMessagesOptions ( ) " >
< ion-icon src = "assets/images/icons-menu.svg" > < / ion-icon >
< / button >
2021-07-23 14:43:51 +01:00
< / div >
2020-12-30 11:13:50 +01:00
< / div >
2021-04-07 15:59:27 +01:00
< div hidden class = "header-bottom" ( click ) = " addContacts ( ) " >
2020-12-30 11:13:50 +01:00
< div class = "header-bottom-icon" >
< ion-icon src = "assets/icon/icons-user.svg" > < / ion-icon >
< / div >
< div class = "header-bottom-contacts" >
< ion-label class = "text-color-blue" > Adicionar contacto< / ion-label >
< / div >
< / div >
< / div >
< / ion-toolbar >
< / ion-header >
< ion-content >
2021-09-30 08:43:49 +01:00
2021-01-27 16:01:49 +01:00
< 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 >
2021-09-30 08:43:49 +01:00
2021-07-26 14:34:52 +01:00
< div class = "messages" # scrollMe >
2021-09-30 08:43:49 +01:00
< div ( click ) = " handleClick ( ) " ( press ) = " handlePress ( ) " class = 'message-container incoming-{{msg.u.username!=loggedUser.me.username}}' * ngFor = "let msg of chatMessageStore.message[roomId] ; let last = last" >
<!-- <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)="deleteMessage(msg._id)" class="menuButton">Apagar mensagem</button>
</mat - menu>
</div> -->
2020-12-30 11:13:50 +01:00
< div class = "title" >
2021-01-13 10:02:30 +01:00
< ion-label > {{msg.u.name}}< / ion-label >
2021-08-20 17:00:48 +01:00
< span class = "time" > {{showDateDuration(msg._updatedAt)}}< / span >
2020-12-30 11:13:50 +01:00
< / div >
< div >
2021-01-13 10:02:30 +01:00
< ion-label > {{msg.msg}}< / ion-label >
2021-09-21 14:05:59 +01:00
< div * ngIf = "msg.attachments" class = "message-attachments" >
< div * ngFor = "let file of msg.attachments" >
< img * ngIf = "file.image_url" src = "{{file.image_url}}" alt = "image" >
< div >
2021-09-23 12:13:20 +01:00
< div >
< div class = "file" >
<!-- <canvas id="pdf_canvas"></canvas> -->
< ion-label class = "file-details" * ngIf = "msg.file" >
< span ( click ) = " viewDocument ( file . title_link ) " class = "file-title cursor-pointer" >
< fa-icon * ngIf = "msg.file.type == 'application/pdf'" icon = "file-pdf" class = "pdf-icon" > < / fa-icon >
< fa-icon * ngIf = "msg.file.type == 'application/word'" icon = "file-word" class = "word-icon" > < / fa-icon >
< ion-icon * ngIf = "msg.file.type == 'application/webtrix'" src = "assets/icon/webtrix.svg" > < / ion-icon >
{{file.title}}
< / span >
< / ion-label >
< / div >
< div class = "file-details-optional" >
< ion-label * ngIf = "msg.file" >
< span * ngIf = "file.description" > {{file.description}}< / span >
< span * ngIf = "file.description && msg.file.type != 'application/webtrix'" > • < / span >
< span * ngIf = "msg.file.type != 'application/webtrix'" > {{msg.file.type.replace('application/','').toUpperCase()}}< / span >
< / ion-label >
< / div >
2021-09-21 14:05:59 +01:00
< / div >
< / div >
< / div >
< / div >
2021-08-23 16:31:06 +01:00
{{last ? scrollToBottom() : ''}}
2020-12-30 11:13:50 +01:00
< / div >
< / div >
< / div >
2021-09-24 15:39:25 +01:00
< ion-fab horizontal = "end" vertical = "bottom" slot = "fixed" >
< ion-fab-button * ngIf = "scrollToBottomBtn" ( click ) = " scrollToBottomClicked ( ) " color = "light" size = "small" >
< ion-icon name = "chevron-down" > < / ion-icon >
< / ion-fab-button >
< / ion-fab >
2020-12-30 11:13:50 +01:00
< / ion-content >
2021-03-29 16:01:58 +01:00
<!-- <ion - footer>
2020-12-30 11:13:50 +01:00
<ion - toolbar>
<ion - row align - items - center class="row">
<ion - col size="1">
<ion - label class="ion - no - padding" lines="none">
<ion - icon (click)="openChatOptions()" class="chat - icon - options" src="assets/icon/icons - chat - options.svg"></ion - icon>
</ion - label>
</ion - col>
<ion - col size="9">
<ion - item class="ion - no - padding type - message" lines="none">
2021-01-13 10:02:30 +01:00
<ion - textarea clearOnEdit="true" placeholder="Escrever uma mensagem" auto - grow class="message - input" rows="1" [(ngModel)]="message"></ion - textarea>
2020-12-30 11:13:50 +01:00
<ion - icon slot="end" src="assets/icon/icons - chat - mic.svg"></ion - icon>
</ion - item>
</ion - col>
<ion - col size="2">
<ion - label>
2021-01-13 10:02:30 +01:00
<ion - icon (click)="sendMessage()" class="chat - icon - send" src="assets/icon/icons - chat - send.svg"></ion - icon>
2020-12-30 11:13:50 +01:00
</ion - label>
</ion - col>
</ion - row>
</ion - toolbar>
2021-03-29 16:01:58 +01:00
</ion - footer> -->
< ion-footer >
< div class = "container width-100 d-flex" >
< div >
2021-08-18 18:58:02 +01:00
< button class = "btn-no-color" ( click ) = " openChatOptions ( ) " >
< ion-icon class = "chat-icon-options" src = "assets/images/icons-add-new-event.svg" > < / ion-icon >
2021-04-09 08:59:22 +01:00
< / button >
2021-03-29 16:01:58 +01:00
< / 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 >
2021-07-26 10:02:38 +01:00
< button hidden class = "btn-no-color" ( click ) = " notImplemented ( ) " >
2021-07-23 14:43:51 +01:00
<!-- <ion - icon slot="end" src="assets/icon/icons - chat - mic.svg"></ion - icon> -->
2021-04-13 14:14:55 +01:00
< / button >
2021-03-29 16:01:58 +01:00
< / ion-item >
< / div >
< div >
2021-04-12 00:22:47 +01:00
< button * ngIf = "message" class = "btn-no-color" ( click ) = " sendMessage ( ) " >
< ion-icon class = "chat-icon-send" src = "assets/icon/icons-chat-send.svg" > < / ion-icon >
< / button >
< button * ngIf = "!message" class = "btn-no-color" >
< ion-icon class = "chat-icon-send" src = "assets/icon/icons-chat-send.svg" > < / ion-icon >
2021-04-09 08:59:22 +01:00
< / button >
2021-03-29 16:01:58 +01:00
< / div >
< / div >
2021-07-23 14:43:51 +01:00
< / ion-footer >