Files
fuse-angular/src/app/main/apps/chat/chat-view/chat-view.component.html
2018-06-15 17:45:27 +03:00

117 lines
3.7 KiB
HTML

<!-- CHAT -->
<div class="chat" fxFlex fxLayout="column">
<!-- CHAT TOOLBAR -->
<mat-toolbar class="chat-toolbar">
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
<div fxLayout="row" fxLayoutAlign="start center">
<!-- RESPONSIVE CHATS BUTTON-->
<button mat-icon-button fxHide.gt-md class="responsive-chats-button mr-16"
fuseMatSidenavToggler="chat-left-sidenav"
aria-label="chats button">
<mat-icon>chat</mat-icon>
</button>
<!-- / RESPONSIVE CHATS BUTTON-->
<!-- CHAT CONTACT-->
<div class="chat-contact" fxLayout="row" fxLayoutAlign="start center"
fuseMatSidenavToggler="chat-right-sidenav" (click)="selectContact()">
<div class="avatar-wrapper">
<img [src]="contact.avatar"
class="avatar"
alt="{{contact.name}}"/>
<mat-icon class="s-16 status"
[ngClass]="contact.status">
</mat-icon>
</div>
<div class="chat-contact-name">
{{contact.name}}
</div>
</div>
<!-- / CHAT CONTACT-->
</div>
<div>
<button mat-icon-button [matMenuTriggerFor]="contactMenu" aria-label="more">
<mat-icon>more_vert</mat-icon>
</button>
<mat-menu #contactMenu="matMenu">
<button mat-menu-item fuseMatSidenavToggler="chat-right-sidenav" (click)="selectContact()">
Contact Info
</button>
</mat-menu>
</div>
</div>
</mat-toolbar>
<!-- / CHAT TOOLBAR -->
<!-- CHAT CONTENT -->
<div id="chat-content" fxFlex fusePerfectScrollbar>
<!-- CHAT MESSAGES -->
<div class="chat-messages">
<!-- MESSAGE -->
<div fxLayout="row" *ngFor="let message of dialog" class="message-row"
[ngClass]="{'user' :message.who === user.id}">
<img *ngIf="message.who === contact.id"
src="{{contact.avatar}}"
class="avatar"
alt="{{contact.name}}"/>
<img *ngIf="message.who ===user.id" class="avatar" src="{{user.avatar}}">
<div class="bubble">
<div class="message">{{message.message}}</div>
<div class="time secondary-text">{{message.time | date:'medium'}}</div>
</div>
</div>
<!-- / MESSAGE -->
</div>
<!-- CHAT MESSAGES -->
</div>
<!-- / CHAT CONTENT -->
<!-- CHAT FOOTER -->
<div class="chat-footer" fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="center center">
<!-- REPLY FORM -->
<form #replyForm="ngForm"
(ngSubmit)="reply()"
(keyup.enter)="reply()"
fxFlex class="reply-form"
fxLayout="row"
fxLayoutAlign="start center">
<mat-form-field fxFlex floatLabel="never">
<textarea matInput #replyInput placeholder="Type and hit enter to send message"
ngModel name="message"></textarea>
</mat-form-field>
<button mat-fab type="submit" aria-label="Send message">
<mat-icon>send</mat-icon>
</button>
</form>
<!-- / REPLY FORM -->
</div>
<!-- / CHAT FOOTER-->
</div>
<!-- / CHAT -->