mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
40 lines
1.3 KiB
HTML
40 lines
1.3 KiB
HTML
|
|
<ion-header>
|
||
|
|
<ion-toolbar>
|
||
|
|
<ion-title>chat</ion-title>
|
||
|
|
</ion-toolbar>
|
||
|
|
</ion-header>
|
||
|
|
|
||
|
|
<ion-content>
|
||
|
|
<ion-row *ngFor="let message of messages" class="chat-container">
|
||
|
|
<ion-col size="9" *ngIf="message.user !== currentUser" class="message other-message">
|
||
|
|
<p><b>{{message.user}}</b></p>
|
||
|
|
<span>{{message.msg}}</span>
|
||
|
|
<div class="message-date">{{message.createdAt | date: 'HH:mm'}}</div>
|
||
|
|
</ion-col>
|
||
|
|
<ion-col offset="3" size="9" *ngIf="message.user === currentUser" class="message my-message">
|
||
|
|
<ion-label>
|
||
|
|
<p><b>{{message.user}}</b></p>
|
||
|
|
<span>{{message.msg}}</span>
|
||
|
|
<div class="message-date">{{message.createdAt | date: 'HH:mm'}}</div>
|
||
|
|
</ion-label>
|
||
|
|
</ion-col>
|
||
|
|
|
||
|
|
</ion-row>
|
||
|
|
|
||
|
|
</ion-content>
|
||
|
|
<ion-footer class="ion-no-border">
|
||
|
|
<ion-toolbar>
|
||
|
|
<ion-row align-items-center>
|
||
|
|
<ion-col size="10">
|
||
|
|
<ion-textarea auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||
|
|
</ion-col>
|
||
|
|
<ion-col size="2">
|
||
|
|
<ion-button expand="block" fill="clear" color="primary" [disabled]="message === ''" class="msg-btn"
|
||
|
|
(click)="sendMessage()">
|
||
|
|
<ion-icon name="send" slot="icon-only"></ion-icon>
|
||
|
|
</ion-button>
|
||
|
|
</ion-col>
|
||
|
|
</ion-row>
|
||
|
|
</ion-toolbar>
|
||
|
|
</ion-footer>
|