Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Step 2.15: Added chats page view with a list of chats
- Loading branch information
1 parent
1430473
commit e357a27
Showing
1 changed file
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,32 @@ | ||
<ion-header> | ||
<ion-navbar> | ||
<ion-navbar color="whatsapp"> | ||
<ion-title> | ||
Chats | ||
</ion-title> | ||
<ion-buttons end> | ||
<button ion-button icon-only class="add-chat-button"> | ||
<ion-icon name="person-add"></ion-icon> | ||
</button> | ||
<button ion-button icon-only class="options-button"> | ||
<ion-icon name="more"></ion-icon> | ||
</button> | ||
</ion-buttons> | ||
</ion-navbar> | ||
</ion-header> | ||
|
||
<ion-content padding> | ||
Hello! | ||
<ion-content padding class="chats-page-content"> | ||
<ion-list class="chats"> | ||
<button ion-item *ngFor="let chat of chats | async" class="chat"> | ||
<img class="chat-picture" [src]="chat.picture"> | ||
|
||
<div class="chat-info"> | ||
<h2 class="chat-title">{{chat.title}}</h2> | ||
|
||
<span *ngIf="chat.lastMessage" class="last-message"> | ||
<p class="last-message-content">{{chat.lastMessage.content}}</p> | ||
<span class="last-message-timestamp">{{chat.lastMessage.createdAt}}</span> | ||
</span> | ||
</div> | ||
</button> | ||
</ion-list> | ||
</ion-content> |