mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Added chat integration with socket.io
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user