Skip to content

Commit 760bd77

Browse files
dotansimhadarkbasic
authored andcommitted
Step 2.12: Add the layout of the chats page
1 parent 9b37a43 commit 760bd77

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

src/pages/chats/chats.html

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
11
<ion-header>
2-
<ion-navbar>
2+
<ion-navbar color="whatsapp">
33
<ion-title>
44
Chats
55
</ion-title>
6+
<ion-buttons end>
7+
<button ion-button icon-only class="add-chat-button">
8+
<ion-icon name="person-add"></ion-icon>
9+
</button>
10+
<button ion-button icon-only class="options-button">
11+
<ion-icon name="more"></ion-icon>
12+
</button>
13+
</ion-buttons>
614
</ion-navbar>
715
</ion-header>
816

9-
<ion-content padding>
10-
Hello!
17+
<ion-content class="chats-page-content">
18+
<ion-list class="chats">
19+
<ion-item-sliding *ngFor="let chat of chats | async">
20+
<button ion-item class="chat">
21+
<img class="chat-picture" [src]="chat.picture">
22+
<div class="chat-info">
23+
<h2 class="chat-title">{{chat.title}}</h2>
24+
25+
<span *ngIf="chat.lastMessage" class="last-message">
26+
<p *ngIf="chat.lastMessage.type == 'text'" class="last-message-content last-message-content-text">{{chat.lastMessage.content}}</p>
27+
<span class="last-message-timestamp">{{chat.lastMessage.createdAt }}</span>
28+
</span>
29+
</div>
30+
</button>
31+
<ion-item-options class="chat-options">
32+
<button ion-button color="danger" class="option option-remove">Remove</button>
33+
</ion-item-options>
34+
</ion-item-sliding>
35+
</ion-list>
1136
</ion-content>

0 commit comments

Comments
 (0)