Skip to content

Commit 5856a2e

Browse files
authored
Merge pull request #2022 from numbersprotocol/feature-profile-tab-grid-rebrand
Feature profile tab grid rebrand
2 parents 460a086 + a102794 commit 5856a2e

File tree

3 files changed

+24
-35
lines changed

3 files changed

+24
-35
lines changed

src/app/features/home/capture-tab/capture-tab.component.html

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,28 @@
2727

2828
<div *ngSwitchCase="'captured'">
2929
<div class="capture-container" *transloco="let t">
30-
<ng-container
31-
*ngFor="
32-
let group of capturesByDate$
33-
| ngrxPush
34-
| keyvalue: keyDescendingOrder;
35-
first as isFirstGroup;
36-
trackBy: trackCaptureGroupByDate
37-
"
38-
>
39-
<div class="mat-title">{{ group.key | date: 'longDate' }}</div>
40-
<mat-grid-list cols="3" gutterSize="8px">
41-
<mat-grid-tile
42-
*ngFor="
43-
let proof of group.value;
44-
first as isFirstProof;
45-
trackBy: trackCaptureItem
46-
"
47-
class="capture-item"
48-
[joyrideStep]="
49-
isFirstGroup && isFirstProof
50-
? 'highlightFirstCapture'
51-
: 'notFirst'
52-
"
53-
[title]="t('userGuide.capturedItem')"
54-
[text]="t('userGuide.openToSeeDetailsAndMoreActionItems')"
55-
>
56-
<app-capture-item [proof]="proof"></app-capture-item>
57-
</mat-grid-tile>
58-
</mat-grid-list>
59-
</ng-container>
30+
<mat-grid-list cols="2" gutterSize="16px">
31+
<mat-grid-tile
32+
*ngFor="
33+
let proof of captures$ | ngrxPush;
34+
first as isFirstProof;
35+
trackBy: trackCaptureItem
36+
"
37+
class="capture-item"
38+
[joyrideStep]="isFirstProof ? 'highlightFirstCapture' : 'notFirst'"
39+
[title]="t('userGuide.capturedItem')"
40+
[text]="t('userGuide.openToSeeDetailsAndMoreActionItems')"
41+
>
42+
<app-capture-item [proof]="proof"></app-capture-item>
43+
</mat-grid-tile>
44+
</mat-grid-list>
6045
</div>
6146
</div>
6247

6348
<div class="post-captures" *ngSwitchCase="'collected'">
64-
<mat-grid-list cols="3" gutterSize="8px">
49+
<mat-grid-list cols="2" gutterSize="16px">
6550
<mat-grid-tile
51+
class="capture-item"
6652
*ngFor="
6753
let postCapture of postCaptures$ | ngrxPush;
6854
trackBy: trackPostCapture

src/app/features/home/capture-tab/capture-tab.component.scss

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,14 @@ app-avatar {
6262
}
6363

6464
.capture-container {
65-
padding-left: 16px;
66-
padding-right: 16px;
65+
padding: 32px 16px;
6766
}
6867

6968
app-capture-item {
7069
width: 100%;
7170
height: 100%;
7271
overflow: hidden;
73-
border-radius: 4px;
72+
border-radius: 16px;
7473
}
7574

7675
.post-captures {
@@ -84,7 +83,7 @@ app-capture-item {
8483
object-fit: cover;
8584
object-position: center;
8685
overflow: hidden;
87-
border-radius: 4px;
86+
border-radius: 16px;
8887
}
8988

9089
ion-icon {

src/app/features/home/capture-tab/capture-tab.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ export class CaptureTabComponent {
4343
)
4444
);
4545

46+
readonly captures$ = this.proofs$.pipe(
47+
map(proofs => proofs.sort((a, b) => b.timestamp - a.timestamp))
48+
);
49+
4650
readonly networkConnected$ = this.networkService.connected$;
4751

4852
readonly postCaptures$ = this.networkConnected$.pipe(

0 commit comments

Comments
 (0)