2021-03-04 18:50:26 +01:00
|
|
|
<ion-header class="ion-no-border">
|
|
|
|
|
<ion-toolbar class="header-toolbar">
|
|
|
|
|
<div class="main-header">
|
|
|
|
|
<div class="header-top">
|
|
|
|
|
<div class="middle">
|
2021-04-15 23:57:14 +01:00
|
|
|
<ion-label class="title">{{roomName}}</ion-label>
|
2021-03-04 18:50:26 +01:00
|
|
|
</div>
|
|
|
|
|
<div class="right">
|
2021-04-09 09:04:45 +01:00
|
|
|
<button class="btn-no-color" (click)="openGroupMessagesOptions()">
|
|
|
|
|
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
|
|
|
|
</button>
|
2021-07-23 14:43:51 +01:00
|
|
|
</div>
|
2021-03-04 18:50:26 +01:00
|
|
|
</div>
|
2021-03-17 11:13:09 +01:00
|
|
|
<div (click)="openGroupContactsPage()" class="header-bottom">
|
2021-03-04 18:50:26 +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 *ngFor="let member of members" >
|
|
|
|
|
{{member.name}},
|
|
|
|
|
</ion-label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</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>
|
2021-07-26 14:09:26 +01:00
|
|
|
|
|
|
|
|
<div class="messages overflow-y-auto" #scrollMe>
|
|
|
|
|
<div class="welcome-text">
|
|
|
|
|
<ion-label> Esta conversa passou a grupo</ion-label><br />
|
|
|
|
|
<ion-label>A conversa original mantêm-se como chat individual</ion-label>
|
|
|
|
|
</div>
|
2021-08-23 16:31:06 +01:00
|
|
|
<div class="container-width-100" *ngFor="let msg of messages; let last = last" #scrollMe>
|
2021-09-09 11:47:49 +01:00
|
|
|
<div *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru'" class='incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45'>
|
2021-03-15 10:42:19 +01:00
|
|
|
<div class="title">
|
|
|
|
|
<ion-label>{{msg.u.name}}</ion-label>
|
2021-09-06 16:53:58 +01:00
|
|
|
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
2021-03-15 10:42:19 +01:00
|
|
|
</div>
|
2021-09-14 15:57:24 +01:00
|
|
|
<div class="messages">
|
2021-03-15 10:42:19 +01:00
|
|
|
<ion-label>{{msg.msg}}</ion-label>
|
2021-09-14 15:57:24 +01:00
|
|
|
<div *ngIf="msg.attachments" class="message-attachments">
|
2021-09-13 12:37:58 +01:00
|
|
|
<div *ngFor="let file of msg.attachments">
|
2021-09-14 15:57:24 +01:00
|
|
|
<img *ngIf="file.image_url" src="{{file.image_url}}" alt="image">
|
|
|
|
|
<div *ngIf="file.thumb_url">
|
|
|
|
|
<div class="file d-flex">
|
|
|
|
|
<ion-thumbnail slot="start">
|
|
|
|
|
<img src="{{file.thumb_url}}" alt="image">
|
|
|
|
|
</ion-thumbnail>
|
|
|
|
|
<ion-label>
|
|
|
|
|
<h3 (click)="viewDocument(file.title_link)" class="file-title cursor-pointer">{{file.title}}</h3>
|
|
|
|
|
<p *ngIf="file.text">{{file.text}}</p>
|
|
|
|
|
</ion-label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-09-13 12:37:58 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-08-23 16:31:06 +01:00
|
|
|
{{last ? scrollToBottom() : ''}}
|
2021-03-15 10:42:19 +01:00
|
|
|
</div>
|
2021-03-04 18:50:26 +01:00
|
|
|
</div>
|
2021-03-15 10:42:19 +01:00
|
|
|
<div *ngIf="msg.t == 'r'" class="info-text">
|
2021-09-07 15:19:56 +01:00
|
|
|
<ion-label>Alterou o nome do grupo para "{{msg.msg.split('-').join(' ')}}"</ion-label><br />
|
|
|
|
|
{{last ? scrollToBottom() : ''}}
|
2021-03-04 18:50:26 +01:00
|
|
|
</div>
|
2021-09-08 14:36:49 +01:00
|
|
|
<div *ngIf="msg.t == 'ul'" class="info-text-leave">
|
2021-09-09 11:47:49 +01:00
|
|
|
<div *ngFor="let user of allUsers">
|
|
|
|
|
<div *ngIf="msg.msg == user.username">
|
|
|
|
|
<ion-label>{{user.name}} saiu do grupo</ion-label><br />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{last ? scrollToBottom() : ''}}
|
|
|
|
|
</div>
|
|
|
|
|
<div *ngIf="msg.t == 'ru'" class="info-text-leave">
|
|
|
|
|
<div *ngFor="let user of allUsers">
|
|
|
|
|
<div *ngIf="msg.msg == user.username">
|
|
|
|
|
<ion-label>{{user.name}} foi removido do grupo</ion-label><br />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-09-08 14:36:49 +01:00
|
|
|
{{last ? scrollToBottom() : ''}}
|
|
|
|
|
</div>
|
2021-03-04 18:50:26 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</ion-content>
|
2021-04-12 00:22:47 +01:00
|
|
|
|
2021-03-04 18:50:26 +01:00
|
|
|
<ion-footer>
|
2021-03-15 10:42:19 +01:00
|
|
|
<div class="container width-100 d-flex">
|
|
|
|
|
<div>
|
2021-08-18 09:23:53 +01:00
|
|
|
<button class="btn-no-color" (click)="openSendGroupMessageOptions()">
|
2021-08-18 17:13:42 +01:00
|
|
|
<ion-icon class="chat-icon-options" src="assets/images/icons-add-new-event.svg"></ion-icon>
|
2021-04-09 09:04:45 +01:00
|
|
|
</button>
|
2021-03-15 10:42:19 +01:00
|
|
|
</div>
|
|
|
|
|
<div class="width-80">
|
|
|
|
|
<ion-item class="ion-no-padding type-message" lines="none">
|
2021-07-26 12:12:59 +01:00
|
|
|
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
2021-07-26 10:48:34 +01:00
|
|
|
<button hidden class="btn-no-color">
|
2021-04-13 14:14:55 +01:00
|
|
|
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
|
|
|
|
|
</button>
|
2021-03-15 10:42:19 +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 09:04:45 +01:00
|
|
|
</button>
|
2021-03-15 10:42:19 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-03-04 18:50:26 +01:00
|
|
|
</ion-footer>
|
2021-03-12 11:56:54 +01:00
|
|
|
|