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 ( ) " >
2021-09-30 10:41:40 +01:00
<!-- <ion - icon slot="end" src='assets/images/icons - arrow - arrow - left.svg'></ion - icon> -->
2021-11-16 16:00:14 +01:00
< fa-icon icon = "chevron-left" class = "header-top-btn font-awesome-1" > < / fa-icon >
2021-04-11 07:05:39 +01:00
< / button >
2021-03-12 11:56:54 +01:00
< / div >
2021-09-30 08:43:49 +01:00
< div class = "middle-container" * ngIf = "!showMessageOptions" >
2022-01-14 14:22:31 +01:00
< div class = "middle" >
< ion-label class = "title" > {{wsChatMethodsService.getDmRoom(roomId).name}}< / ion-label >
<!-- <span><ion - icon class="{{users.status}}" name="ellipse"></ion - icon></span> -->
2021-09-30 08:43:49 +01:00
< / div >
< / div >
< div class = "middle-container-options" * ngIf = "showMessageOptions" >
2021-09-30 10:41:40 +01:00
< fa-icon ( click ) = " deleteMessage ( selectedMsgId ) " icon = "trash" class = "middle-container-options-icons" > < / fa-icon >
2021-09-30 08:43:49 +01:00
<!-- <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 ( ) " >
2021-11-16 16:00:14 +01:00
< ion-icon * ngIf = "ThemeService.currentTheme == 'default' " src = "assets/images/icons-menu.svg" > < / ion-icon >
< ion-icon * ngIf = "ThemeService.currentTheme == 'gov' " src = "assets/images/theme/gov/icons-menu.svg" > < / ion-icon >
2021-04-11 07:05:39 +01:00
< / 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" >
2021-11-16 16:00:14 +01:00
< 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 >
2020-12-30 11:13:50 +01:00
< / 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-10-07 15:30:36 +01:00
<!-- <ion - refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
2021-01-27 16:01:49 +01:00
<ion - progress - bar type="indeterminate" *ngIf="showLoader"></ion - progress - bar>
<ion - refresher - content>
</ion - refresher - content>
2021-10-07 15:30:36 +01:00
</ion - refresher> -->
2021-09-30 10:41:40 +01:00
< div ( click ) = " handleClick ( ) " class = "messages" # scrollMe >
2022-01-28 16:21:26 +01:00
< div class = "messages-list-item-wrapper container-width-100" * ngFor = "let msg of wsChatMethodsService.getDmRoom(this.roomId).messages; let last = last" [ class . messages-list-item-wrapper-active ] = " msg . _id = = selectedMsgId " >
2022-01-27 18:29:09 +01:00
< div ( press ) = " handlePress ( msg . _id ) " class = 'message-container incoming-{{msg.u.username!=loggedUser.me.username}}' ( click ) = " downloadFileMsg ( msg ) " * ngIf = "msg.msg !=''" >
2021-09-30 10:41:40 +01:00
< div class = "title" >
2022-02-16 15:52:59 +01:00
< ion-label ( click ) = " hkellor ( ) " > {{msg.u.name}}< / ion-label >
2022-02-10 15:50:11 +01:00
< span class = "time" > {{msg.duration}}< / span >
2021-09-30 10:41:40 +01:00
< / div >
< div >
< ion-label > {{msg.msg}}< / ion-label >
{{last ? scrollToBottom() : ''}}
2021-09-21 14:05:59 +01:00
< / div >
2020-12-30 11:13:50 +01:00
< / div >
2022-01-06 20:52:50 +01:00
2022-01-21 16:55:05 +01:00
<!-- <div (press)="handlePress(msg._id)" class='message - container incoming - {{msg.u.username!=loggedUser.me.username}}' (click)="openPreview(msg)" *ngIf="msg.msg !=''">
2022-01-06 20:52:50 +01:00
<div class="title">
<ion - label>{{msg.u.name}}</ion - label>
2022-02-10 15:50:11 +01:00
<span class="time">{{msg.duration}}</span>
2022-01-06 20:52:50 +01:00
</div>
<div>
<ion - label>{{msg.msg}}</ion - label>
{{last ? scrollToBottom() : ''}}
</div>
2022-01-21 16:55:05 +01:00
</div> -->
2022-01-06 20:52:50 +01:00
2022-01-27 16:12:51 +01:00
< div * ngIf = "msg.file" >
< div ( press ) = " handlePress ( msg . _id ) " class = 'message-container incoming-{{msg.u.username!=loggedUser.me.username}}' * ngIf = "msg.file.type != 'application/meeting'" >
2022-01-06 20:52:50 +01:00
< div class = "title" >
< ion-label > {{msg.u.name}}< / ion-label >
2022-02-10 15:50:11 +01:00
< span class = "time" > {{msg.duration}}< / span >
2022-01-06 20:52:50 +01:00
< / div >
< div >
< div * ngIf = "msg.attachments" class = "message-attachments" >
< div * ngFor = "let file of msg.attachments let i = index" >
2022-01-27 16:12:51 +01:00
< div * ngIf = "msg.file.type == 'application/img'" ( click ) = " openPreview ( msg ) " >
2022-02-08 17:44:15 +01:00
< img * ngIf = "msg.attachments[0].image_url" src = "{{msg.attachments[0].image_url}}" alt = "image" >
< ion-icon * ngIf = "msg.attachments[0].image_url == null" name = "download-outline" > < / ion-icon >
2022-01-06 20:52:50 +01:00
< / div >
2022-01-27 16:12:51 +01:00
< div * ngIf = "msg.file.type != 'application/img'" >
2022-01-06 20:52:50 +01:00
< div class = "file" >
< div ( click ) = " docIndex ( i ) ; viewDocument ( msg . file , file . title_link ) " class = "file-details add-ellipsis cursor-pointer" * ngIf = "msg.file" >
< span * ngIf = "msg.file.type" >
< 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 >
< fa-icon * ngIf = "msg.file.type == 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'" icon = "file-word" class = "excel-icon" > < / fa-icon >
< ion-icon * ngIf = "msg.file.type == 'application/webtrix'" src = "assets/icon/webtrix.svg" > < / ion-icon >
< / span >
< ion-label class = "file-title" > {{file.title}}< / ion-label >
< / div >
< / div >
< div class = "file-details-optional" >
< ion-label * ngIf = "msg.file && msg.file != ''" >
< span * ngIf = "file.description" > {{file.description}}< / span >
< span * ngIf = "file.description && msg.file.type != 'application/webtrix'" > • < / span >
2022-02-04 00:22:35 +01:00
< span * ngIf = "msg.file.type != 'application/webtrix'" > {{msg.displayType}}< / span >
2022-01-06 20:52:50 +01:00
< / ion-label >
< / div >
< / div >
< / div >
< / div >
{{last ? scrollToBottom() : ''}}
< / div >
< / div >
2022-01-27 16:12:51 +01:00
< div * ngIf = "msg.file.type == 'application/meeting'" class = "info-meeting" >
< ion-label class = "info-meeting-small" > {{msg.u.name}} criou esta reunião< / ion-label > < br / >
< button ( click ) = " goToEvent ( msg . file . id ) " class = "btn-no-color info-meeting-normal" > < ion-label class = "info-meeting-normal" > {{msg.file.subject}}< / ion-label > < / button > < br / >
< ion-label class = "info-meeting-medium" > < ion-icon name = "calendar-outline" > < / ion-icon > De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}< / ion-label > < br / >
< ion-label class = "info-meeting-medium" > < ion-icon > < / ion-icon > < ion-icon name = "location-outline" > < / ion-icon > {{msg.file.venue}}< / ion-label > < br / >
< / div >
2022-01-06 20:52:50 +01:00
2022-01-27 16:12:51 +01:00
< / div >
<!-- <div *ngIf="msg.file">
2022-01-06 20:52:50 +01:00
<div *ngIf="msg.file.type == 'application/meeting'" class="info - meeting">
2021-12-22 10:31:10 +01:00
<ion - label class="info - meeting - small">{{msg.u.name}} criou esta reunião</ion - label><br />
<button (click)="goToEvent(msg.file.id)" class="btn - no - color info - meeting - normal"><ion - label class="info - meeting - normal">{{msg.file.subject}}</ion - label></button><br />
<ion - label class="info - meeting - medium"><ion - icon name="calendar - outline"></ion - icon> De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}</ion - label><br />
<ion - label class="info - meeting - medium"><ion - icon></ion - icon><ion - icon name="location - outline"></ion - icon> {{msg.file.venue}}</ion - label><br />
</div>
{{last ? scrollToBottom() : ''}}
2022-01-27 16:12:51 +01:00
</div> -->
2020-12-30 11:13:50 +01:00
< / 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 >
2022-02-24 13:35:54 +01:00
< div class = "typing" * ngIf = "wsChatMethodsService.getDmRoom(roomId).otherUserType == true" > A escrever...< / div >
2021-11-16 16:00:14 +01:00
< ion-list hidden >
< ion-item ( click ) = " playFile ( storedFileNames ) " >
{{storedFileNames}}
< / ion-item >
< ion-item ( click ) = " playFile ( storedFileNames ) " >
{{storedFileNames}}
< / ion-item >
< / ion-list >
< audio hidden controls >
2022-01-05 21:27:26 +01:00
<!-- <source src="https://www.tabularium.pt/file - upload/5g6DkyMC4MHcuaDyp/Audio%20record.mp3" type="audio/mpeg"> -->
2021-11-16 16:00:14 +01:00
< / audio >
<!-- <button (click)="startRecording()">Start Recording</button>
<button (click)="stopRecording()">Stop Recording</button> -->
2021-03-29 16:01:58 +01:00
< div class = "container width-100 d-flex" >
< div >
2021-12-07 17:25:09 +01:00
2021-08-18 18:58:02 +01:00
< button class = "btn-no-color" ( click ) = " openChatOptions ( ) " >
2021-11-16 16:00:14 +01:00
< ion-icon * ngIf = "ThemeService.currentTheme == 'default' " class = "chat-icon-options" src = "assets/images/icons-add.svg" > < / ion-icon >
< ion-icon * ngIf = "ThemeService.currentTheme == 'gov' " class = "chat-icon-options" src = "assets/images/theme/gov/icons-add.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" >
2022-02-10 16:14:25 +01:00
< ion-textarea autocomplete = "on" autocorrect = "on" spellcheck = "true" * ngIf = "!recording" clearOnEdit = "true" placeholder = "Escrever uma mensagem" auto-grow class = "message-input" rows = "1" [ ( ngModel ) ] = " wsChatMethodsService . getDmRoom ( roomId ) . message " ( ionChange ) = " wsChatMethodsService . getDmRoom ( roomId ) . sendTyping ( ) " > < / ion-textarea >
2022-01-20 14:27:54 +01:00
< ion-textarea autocomplete = "on" spellcheck = "true" * ngIf = "recording" clearOnEdit = "true" placeholder = "Escrever uma mensagem" auto-grow class = "message-input" rows = "1" [ ( ngModel ) ] = " durationDisplay " > < / ion-textarea >
2021-11-16 16:00:14 +01:00
< button hidden # recordbtn class = "btn-no-color" ( click ) = " notImplemented ( ) " >
< 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 >
2022-01-28 16:15:20 +01:00
< button * ngIf = "wsChatMethodsService.getDmRoom(roomId).message" class = "btn-no-color" ( click ) = " sendMessage ( ) " >
2021-11-16 16:00:14 +01:00
< 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 >
2021-04-12 00:22:47 +01:00
< / button >
2022-01-28 16:15:20 +01:00
< button * ngIf = "!wsChatMethodsService.getDmRoom(roomId).message" class = "btn-no-color" >
2021-11-16 16:00:14 +01:00
< 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 >
2021-04-09 08:59:22 +01:00
< / button >
2021-03-29 16:01:58 +01:00
< / div >
< / div >
2021-11-19 10:28:22 +01:00
2021-07-23 14:43:51 +01:00
< / ion-footer >