aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+about
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+about')
-rw-r--r--client/src/app/+about/about-follows/about-follows.component.html6
-rw-r--r--client/src/app/+about/about-follows/about-follows.component.scss4
-rw-r--r--client/src/app/+about/about-follows/about-follows.component.ts29
3 files changed, 23 insertions, 16 deletions
diff --git a/client/src/app/+about/about-follows/about-follows.component.html b/client/src/app/+about/about-follows/about-follows.component.html
index 6d38e2109..fbca9f3b0 100644
--- a/client/src/app/+about/about-follows/about-follows.component.html
+++ b/client/src/app/+about/about-follows/about-follows.component.html
@@ -1,4 +1,4 @@
1<div class="row" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()"> 1<div class="row">
2 <h1 class="sr-only" i18n>Follows</h1> 2 <h1 class="sr-only" i18n>Follows</h1>
3 <div class="col-xl-6 col-md-12"> 3 <div class="col-xl-6 col-md-12">
4 <h2 i18n class="subtitle">Followers instances</h2> 4 <h2 i18n class="subtitle">Followers instances</h2>
@@ -8,6 +8,8 @@
8 <a *ngFor="let follower of followers" [href]="buildLink(follower)" target="_blank" rel="noopener noreferrer"> 8 <a *ngFor="let follower of followers" [href]="buildLink(follower)" target="_blank" rel="noopener noreferrer">
9 {{ follower }} 9 {{ follower }}
10 </a> 10 </a>
11
12 <a id="showMore" href="javascript:;" *ngIf="!showMoreFollowers" (click)="loadAllFollowers()" (click)= "showMoreFollowers=true">Show full list</a>
11 </div> 13 </div>
12 14
13 <div class="col-xl-6 col-md-12"> 15 <div class="col-xl-6 col-md-12">
@@ -18,6 +20,8 @@
18 <a *ngFor="let following of followings" [href]="buildLink(following)" target="_blank" rel="noopener noreferrer"> 20 <a *ngFor="let following of followings" [href]="buildLink(following)" target="_blank" rel="noopener noreferrer">
19 {{ following }} 21 {{ following }}
20 </a> 22 </a>
23
24 <a id="showMore" href="javascript:;" *ngIf="!showMoreFollowings" (click)="loadAllFollowings()" (click)= "showMoreFollowings=true">Show full list</a>
21 </div> 25 </div>
22 26
23</div> 27</div>
diff --git a/client/src/app/+about/about-follows/about-follows.component.scss b/client/src/app/+about/about-follows/about-follows.component.scss
index c6114d270..32a015e89 100644
--- a/client/src/app/+about/about-follows/about-follows.component.scss
+++ b/client/src/app/+about/about-follows/about-follows.component.scss
@@ -16,3 +16,7 @@ a {
16.no-results { 16.no-results {
17 justify-content: flex-start; 17 justify-content: flex-start;
18} 18}
19
20#showMore {
21 color: black;
22}
diff --git a/client/src/app/+about/about-follows/about-follows.component.ts b/client/src/app/+about/about-follows/about-follows.component.ts
index 17c6903b8..d88974b59 100644
--- a/client/src/app/+about/about-follows/about-follows.component.ts
+++ b/client/src/app/+about/about-follows/about-follows.component.ts
@@ -14,6 +14,9 @@ export class AboutFollowsComponent implements OnInit {
14 followers: string[] = [] 14 followers: string[] = []
15 followings: string[] = [] 15 followings: string[] = []
16 16
17 showMoreFollowers = false;
18 showMoreFollowings = false;
19
17 followersPagination: ComponentPagination = { 20 followersPagination: ComponentPagination = {
18 currentPage: 1, 21 currentPage: 1,
19 itemsPerPage: 20, 22 itemsPerPage: 20,
@@ -45,24 +48,20 @@ export class AboutFollowsComponent implements OnInit {
45 this.loadMoreFollowings() 48 this.loadMoreFollowings()
46 } 49 }
47 50
48 onNearOfBottom () { 51 loadAllFollowings () {
49 this.onNearOfFollowersBottom() 52 while(hasMoreItems(this.followingsPagination)) {
53 this.followingsPagination.currentPage += 1
50 54
51 this.onNearOfFollowingsBottom() 55 this.loadMoreFollowings()
56 }
52 } 57 }
53 58
54 onNearOfFollowersBottom () { 59 loadAllFollowers () {
55 if (!hasMoreItems(this.followersPagination)) return 60 while(hasMoreItems(this.followersPagination)) {
56 61 this.followersPagination.currentPage += 1
57 this.followersPagination.currentPage += 1 62
58 this.loadMoreFollowers() 63 this.loadMoreFollowers();
59 } 64 }
60
61 onNearOfFollowingsBottom () {
62 if (!hasMoreItems(this.followingsPagination)) return
63
64 this.followingsPagination.currentPage += 1
65 this.loadMoreFollowings()
66 } 65 }
67 66
68 buildLink (host: string) { 67 buildLink (host: string) {