2024-06-05 10:28:38 +01:00
< ion-header class = "ion-no-border" >
< ion-toolbar class = "header-toolbar" >
2024-08-17 22:05:57 +01:00
< div class = "main-header" >
2021-03-04 18:50:26 +01:00
< div class = "header-top" >
2024-06-05 10:28:38 +01:00
< div class = "middle" >
2024-09-17 16:02:12 +01:00
< ion-label class = "title" > {{ room?.roomName }}< / ion-label >
2022-10-11 15:35:50 +01:00
<!-- <button (click)="ChatMessageDebuggingPage()">Dev</button> -->
2024-08-06 11:24:00 +01:00
< span * ngIf = "roomStatus$ | async as roomStatus" > < ion-icon * ngIf = "roomStatus" class = "online" name = "ellipse" > < / ion-icon > < / span >
2021-03-04 18:50:26 +01:00
< / div >
2024-06-10 16:34:43 +01:00
< div class = "right" >
2024-09-17 16:02:12 +01:00
< button title = "Menu" class = "btn-no-color" ( click ) = " _openMessagesOptions ( ) " >
2023-11-14 12:04:31 +01:00
< ion-icon * ngIf = "ThemeService.currentTheme == 'default' " src = "assets/images/theme/blue/icons-menu.svg" > < / ion-icon >
2022-01-12 17:02:41 +01:00
< ion-icon * ngIf = "ThemeService.currentTheme == 'gov' " src = "assets/images/theme/gov/icons-menu.svg" >
< / ion-icon >
2021-04-09 08:59:22 +01:00
< / button >
2021-07-23 14:43:51 +01:00
< / div >
2021-03-04 18:50:26 +01:00
< / div >
2024-06-13 12:11:17 +01:00
< div class = "d-flex header-bottom" >
2024-09-06 12:23:13 +01:00
< div class = "header-bottom-icon" * ngIf = "roomType == RoomTypeEnum.Group" >
2024-06-13 12:11:17 +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 >
< / div >
2024-06-12 12:54:38 +01:00
2024-09-02 12:33:43 +01:00
< ion-list class = "header-bottom-contacts" * ngIf = "roomMembers$ | async as memberList" >
2024-06-13 12:11:17 +01:00
< ng-container * ngFor = "let user of memberList; let i = index" >
2024-09-02 12:33:43 +01:00
< span * ngIf = "roomType == RoomTypeEnum.Group" > {{ user.wxFullName }}< ng-container * ngIf = "i < memberList.length - 1" > , < / ng-container > < / span >
2024-06-13 12:11:17 +01:00
< / ng-container >
2024-06-12 12:54:38 +01:00
< / ion-list >
2024-06-13 12:11:17 +01:00
2024-07-17 16:39:18 +01:00
2021-03-04 18:50:26 +01:00
< / div >
< / div >
2024-06-12 12:54:38 +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-03-04 18:50:26 +01:00
< / ion-toolbar >
< / ion-header >
2024-06-05 10:28:38 +01:00
< ion-content >
2022-04-22 16:39:46 +01:00
2024-08-26 09:59:30 +01:00
< div class = "messages height-100 width-100 d-flex flex-column rotate-div" # scrollMe >
2024-06-05 14:31:26 +01:00
2024-07-16 14:15:58 +01:00
< div
2024-09-17 16:02:12 +01:00
* ngFor = "let message of messages1[room?.$id]; let messageIndex = index" class = "messages-list-item-wrapper px-10-em"
2024-08-29 12:13:15 +01:00
[ ngClass ] = " {
2024-09-03 16:26:54 +01:00
' info-meeting ' : message . messageType = = IMessageType . information & & ! message . ballon ,
2024-09-04 10:58:26 +01:00
' info-ballon ' : message . ballon = = true ,
' my-message ' : message . messageType = = IMessageType . normal & & message ? . sender ? . wxUserId = == SessionStore . user . UserId & & ! message . ballon ,
' other-message ' : message . messageType = = IMessageType . normal & & message ? . sender ? . wxUserId ! = = SessionStore . user . UserId & & ! message . ballon
2024-08-29 12:13:15 +01:00
} "
2024-08-06 16:53:13 +01:00
>
2024-09-10 16:01:51 +01:00
<!-- Emoji Picker -->
< div * ngIf = "selectedMessage === message" class = "emoji-picker mr-20" [ ngStyle ] = " { ' bottom ' : ' 0 ' , ' right ' : ' 0 ' } " >
< span * ngFor = "let emoji of emojis" ( click ) = " addReaction ( message , emoji ) " class = "emoji-icon" >
{{ emoji }}
< / span >
< / div >
2024-09-03 16:26:54 +01:00
< div class = "message-container rotate-div" * ngIf = "message.showMessage" >
2024-08-26 09:59:30 +01:00
< div class = "d-flex justify-content-between" >
2024-08-13 10:52:35 +01:00
< div >
2024-08-29 15:23:11 +01:00
< div style = "white-space: pre-line;" >
2024-09-02 16:25:13 +01:00
{{ message.message }}
2024-08-26 09:59:30 +01:00
< / div >
2024-08-13 10:52:35 +01:00
2024-08-26 09:59:30 +01:00
< div * ngFor = "let attachment of message.attachments; let i = index" >
2024-08-13 10:52:35 +01:00
2024-08-26 09:59:30 +01:00
< div * ngIf = "attachment.fileType == MessageAttachmentFileType.Image" >
< img
2024-09-05 11:45:54 +01:00
* ngIf = "message.oneShot != true && attachment.blobURl != true"
2024-08-26 09:59:30 +01:00
[ src ] = " attachment . safeFile "
( load ) = " onImageLoad ( message , messageIndex ) "
( error ) = " onImageError ( ) "
>
2024-08-22 12:27:57 +01:00
2024-09-05 11:45:54 +01:00
< img
* ngIf = "message.oneShot != true && attachment.blobURl"
[ src ] = " attachment . safeFile | safehtml "
( load ) = " onImageLoad ( message , messageIndex ) "
( error ) = " onImageError ( ) "
>
2024-08-26 09:59:30 +01:00
< div * ngIf = "SessionStore.user.UserId == message.sender.wxUserId && message.oneShot == true" >
Mandou uma mensagen com visualização única
< / div >
2024-08-13 17:05:46 +01:00
2024-08-26 09:59:30 +01:00
< div * ngIf = "SessionStore.user.UserId != message.sender.wxUserId && message.oneShot == true" >
<!-- <div *ngIf="message.oneShot == true" class="cursor - pointer"> -->
< div ( click ) = " viewOnce ( $ event , message , i ) " >
Abrir a visualização única
< / div >
2024-08-22 12:27:57 +01:00
< / div >
2024-08-26 09:59:30 +01:00
2024-08-22 12:27:57 +01:00
< / div >
2024-08-26 09:59:30 +01:00
< div * ngIf = "attachment.fileType == MessageAttachmentFileType.Audio" >
< audio [ src ] = " attachment . safeFile | safehtml " preload = "metadata" class = "flex-grow-1" controls controlsList = "nodownload noplaybackrate" > < / audio >
< / div >
2024-08-22 12:27:57 +01:00
2024-09-13 14:03:51 +01:00
< div * ngIf = "attachment.fileType == MessageAttachmentFileType.Doc" class = "d-flex" ( click ) = " openPreview ( message ) " >
< ion-icon * ngIf = "attachment.source == MessageAttachmentFileSource.Webtrix" src = "assets/icon/webtrix.svg" class = "file-icon font-25" > < / ion-icon >
2024-08-26 09:59:30 +01:00
< 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 >
2024-09-04 12:15:44 +01:00
< ion-label > {{ attachment?.fileName || attachment?.description }}< / ion-label >
2024-08-26 09:59:30 +01:00
< / div >
2024-08-15 14:29:11 +01:00
< / div >
2024-08-13 10:52:35 +01:00
< / div >
2024-08-26 09:59:30 +01:00
< 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 * ngIf = "!message.hasAttachment" ( click ) = " editMessage ( message ) " class = "menuButton" > Editar mensagem< / button >
< button ( click ) = " toggleEmojiPicker ( message ) " class = "menuButton" > Reagir mensagem< / button >
< / mat-menu >
< / div >
2024-08-06 16:53:13 +01:00
< / div >
< / div >
2024-08-26 09:59:30 +01:00
< div style = "text-align: end;" >
2024-08-06 16:53:13 +01:00
2024-08-29 15:23:11 +01:00
< div * ngIf = "totalMembers != 0 && SessionStore.user.UserId == message.sender.wxUserId" >
2024-08-26 09:59:30 +01:00
< ion-icon * ngIf = "messageStatus(message) == 'enviar'" src = "assets/images/clock-regular.svg" > < / ion-icon >
< ion-icon * ngIf = "messageStatus(message) == 'enviado'" src = "assets/images/check-solid.svg" > < / ion-icon >
< ion-icon * ngIf = "messageStatus(message) == 'allReceived'" src = "assets/images/check-double-solid.svg" > < / ion-icon >
< ion-icon * ngIf = "messageStatus(message) == 'allViewed'" src = "assets/images/check-double-solid -viewed.svg" > < / ion-icon >
< / div >
2024-08-20 16:34:47 +01:00
< / div >
2024-09-10 16:01:51 +01:00
2024-08-06 16:53:13 +01:00
< / div >
2024-08-26 14:47:03 +01:00
< div class = "message-container rotate-div" * ngIf = "message.isDeleted == true" >
Mensagem foi eliminada
< / div >
2024-09-04 10:58:26 +01:00
< div * ngIf = "message.messageType == IMessageType.information && !message.ballon" class = "text-center" >
2024-08-29 12:13:15 +01:00
{{ message.message }}
< / div >
2024-09-03 16:26:54 +01:00
< div * ngIf = "message.ballon" class = "text-center ballon" >
{{ message.message }}
< / div >
2024-09-04 22:48:29 +01:00
< div class = "rotate-div emoji-container" * ngIf = "message.isDeleted != true && message.messageType != IMessageType.information && message.ballon != true" >
2024-08-26 09:59:30 +01:00
< span * ngFor = "let reaction of message.reactions" class = "emoji-icon" >
{{ reaction.reaction }}
2024-08-02 11:34:57 +01:00
< / span >
< / div >
2024-06-10 16:34:43 +01:00
< / div >
2024-07-26 16:54:32 +01:00
2021-03-04 18:50:26 +01:00
< / div >
2024-07-17 16:39:18 +01:00
< ion-fab horizontal = "start" vertical = "bottom" slot = "fixed" >
< div # array >
< / div >
< / ion-fab >
2021-03-04 18:50:26 +01:00
< / ion-content >
2021-03-12 11:56:54 +01:00
2024-06-05 10:28:38 +01:00
<!-- <ion - footer (click)="ChatSystemService.getDmRoom(roomId).sendReadMessage()"> -->
2024-08-20 16:34:47 +01:00
< ion-footer ( click ) = " sendReadMessage ( ) " >
2022-03-25 12:25:17 +01:00
2024-06-05 10:28:38 +01:00
<!-- <div class="typing" *ngIf="ChatSystemService.getDmRoom(roomId).otherUserType == true" >
2022-02-24 14:59:47 +01:00
<ngx - letters - avatar *ngIf="showAvatar"
2022-09-30 15:13:36 +01:00
[avatarName]= "ChatSystemService.getDmRoom(roomId).name"
2022-02-25 09:54:37 +01:00
[width]="30"
2022-02-24 14:59:47 +01:00
[circular]="true"
2022-02-24 16:21:26 +01:00
fontFamily="Roboto"></ngx - letters - avatar>
2022-02-25 11:08:13 +01:00
está a escrever...
2024-06-05 10:28:38 +01:00
</div> -->
2022-03-14 17:11:00 +01:00
< div class = "width-100 pl-20 pr-20" >
2024-08-09 14:56:36 +01:00
< span > {{durationDisplay}}< / span >
2022-06-29 11:42:31 +01:00
< div class = " audioDiv d-flex width-100 mt-10 mb-10" * ngIf = "lastAudioRecorded" >
2024-08-09 14:56:36 +01:00
< div ( click ) = " start ( audioRecordedSafe ) " * ngIf = "!isPlaying" > < ion-icon slot = "icon-only" name = "play" > < / ion-icon > < / div >
2022-06-29 11:42:31 +01:00
< 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 >
2022-03-14 17:11:00 +01:00
< / div >
2022-02-24 13:35:54 +01:00
2021-03-12 17:35:54 +01:00
< div class = "container width-100 d-flex" >
< div >
2022-03-14 17:11:00 +01:00
< ion-fab * ngIf = "!recording && !lastAudioRecorded && allowTyping" horizontal = "start" vertical = "bottom" slot = "fixed" >
2021-10-06 17:27:49 +01:00
< ion-fab-button color = "light" size = "small" >
< ion-icon name = "add" > < / ion-icon >
< / ion-fab-button >
< ion-fab-list side = "top" >
2023-06-19 12:15:39 +01:00
<!-- <ion - fab - button *ngIf="p.userPermission([p.permissionList.Agenda.access])" title="Nova Reunião" (click)="bookMeeting()" color="light">
2021-10-06 17:27:49 +01:00
<ion - icon name="calendar"></ion - icon>
2023-06-19 12:15:39 +01:00
</ion - fab - button> -->
2023-08-31 13:07:52 +01:00
< ion-fab-button title = "Adicionar Documento" ( click ) = " addFile ( ) " color = "light" >
2021-10-06 17:27:49 +01:00
< ion-icon name = "document" > < / ion-icon >
2023-08-31 13:07:52 +01:00
< / ion-fab-button >
2024-08-09 12:36:51 +01:00
< ion-fab-button title = "Anexar Fotografia" ( click ) = " pickPicture ( ) " color = "light" >
2021-10-06 17:27:49 +01:00
< ion-icon name = "image" > < / ion-icon >
2021-12-23 07:40:01 +01:00
< / ion-fab-button >
2022-02-09 14:34:23 +01:00
< ion-fab-button title = "Tirar Fotografia" ( click ) = " takePictureMobile ( ) " color = "light" >
2021-10-06 17:27:49 +01:00
< ion-icon name = "camera" > < / ion-icon >
2021-12-23 07:40:01 +01:00
< / ion-fab-button >
2022-01-24 15:21:37 +01:00
< ion-fab-button title = "Documento da Gestão Documental" ( click ) = " addFileWebtrix ( ) " color = "light" >
2021-10-07 15:30:36 +01:00
< ion-icon src = "assets/icon/webtrix.svg" > < / ion-icon >
< / ion-fab-button >
2021-10-06 17:27:49 +01:00
< / ion-fab-list >
< / ion-fab >
2022-03-18 11:45:38 +01:00
< button * ngIf = "recording || lastAudioRecorded || !allowTyping" class = "btn-no-color" ( click ) = " deleteRecording ( ) " >
2022-03-14 17:11:00 +01:00
< fa-icon class = "icon-size-27" icon = "trash" > < / fa-icon >
< / button >
2021-03-12 17:35:54 +01:00
< / div >
2021-12-14 23:04:03 +01:00
< div class = "width-100" >
2022-03-14 17:11:00 +01:00
< div * ngIf = "!recording && !lastAudioRecorded" class = "type-message" >
2024-07-31 17:23:44 +01:00
< 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 >
2022-03-14 17:11:00 +01:00
< / 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" >
2022-03-14 19:07:46 +01:00
< ion-icon class = "icon-size-45" name = "stop-circle-outline" color = "danger" > < / ion-icon >
2021-04-13 14:14:55 +01:00
< / button >
2022-03-14 17:11:00 +01:00
< / div >
2021-03-12 17:35:54 +01:00
< / div >
2022-03-14 19:07:46 +01:00
2024-06-05 10:28:38 +01:00
2024-08-09 14:56:36 +01:00
< 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 ) " >
2022-03-14 17:11:00 +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-12 17:35:54 +01:00
< / div >
2024-08-09 14:56:36 +01:00
2021-03-12 17:35:54 +01:00
< / div >
2022-01-24 15:21:37 +01:00
< / ion-footer >