aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormahdi <mahditurki123@yahoo.fr>2020-12-12 22:19:01 +0100
committerChocobozzz <me@florianbigard.com>2020-12-14 09:57:41 +0100
commited8b4014cee544512addfbd75627d2a1cfa0e764 (patch)
tree1a354164d4453928719a2ee9de14e0627efe8a28
parent2b6ea97f1c5f14608019b661ca4c4c8d86f46578 (diff)
downloadPeerTube-ed8b4014cee544512addfbd75627d2a1cfa0e764.tar.gz
PeerTube-ed8b4014cee544512addfbd75627d2a1cfa0e764.tar.zst
PeerTube-ed8b4014cee544512addfbd75627d2a1cfa0e764.zip
Show count of instances and fix show/hide button
-rw-r--r--client/src/app/+about/about-follows/about-follows.component.html14
-rw-r--r--client/src/app/+about/about-follows/about-follows.component.scss5
-rw-r--r--client/src/app/+about/about-follows/about-follows.component.ts4
3 files changed, 12 insertions, 11 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 438e836e0..60cf3a28e 100644
--- a/client/src/app/+about/about-follows/about-follows.component.html
+++ b/client/src/app/+about/about-follows/about-follows.component.html
@@ -1,7 +1,7 @@
1<div class="row"> 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 ({{ followersPagination.totalItems }})</h2>
5 5
6 <div i18n class="no-results" *ngIf="followersPagination.totalItems === 0">This instance does not have instances followers.</div> 6 <div i18n class="no-results" *ngIf="followersPagination.totalItems === 0">This instance does not have instances followers.</div>
7 7
@@ -13,13 +13,13 @@
13 {{ follower }} 13 {{ follower }}
14 </a> 14 </a>
15 </ng-container> 15 </ng-container>
16 16
17 <a i18n class="showMore" *ngIf="!showMoreFollowers" (click)="loadAllFollowers()" (click)="showMoreFollowers=true">Show full list</a> 17 <button i18n class="showMore" *ngIf="!showMoreFollowers && followersPagination.totalItems > 0" (click)="loadAllFollowers()" (click)="showMoreFollowers=true">Show full list</button>
18 <a i18n class="showMore" *ngIf="showMoreFollowers" (click)= "showMoreFollowers=false">Show less</a> 18 <button i18n class="showMore" *ngIf="showMoreFollowers" (click)= "showMoreFollowers=false">Show less</button>
19 </div> 19 </div>
20 20
21 <div class="col-xl-6 col-md-12"> 21 <div class="col-xl-6 col-md-12">
22 <h2 i18n class="subtitle">Followings instances</h2> 22 <h2 i18n class="subtitle">Followings instances ({{ followingsPagination.totalItems }})</h2>
23 23
24 <div i18n class="no-results" *ngIf="followingsPagination.totalItems === 0">This instance is not following any other.</div> 24 <div i18n class="no-results" *ngIf="followingsPagination.totalItems === 0">This instance is not following any other.</div>
25 25
@@ -32,8 +32,8 @@
32 </a> 32 </a>
33 </ng-container> 33 </ng-container>
34 34
35 <a i18n class="showMore" *ngIf="!showMoreFollowings" (click)="loadAllFollowings()" (click)="showMoreFollowings=true">Show full list</a> 35 <button i18n class="showMore" *ngIf="!showMoreFollowings && followingsPagination.totalItems > 0" (click)="loadAllFollowings()" (click)="showMoreFollowings=true">Show full list</button>
36 <a i18n class="showMore" *ngIf="showMoreFollowings" (click)="showMoreFollowings=false">Show less</a> 36 <button i18n class="showMore" *ngIf="showMoreFollowings" (click)="showMoreFollowings=false">Show less</button>
37 </div> 37 </div>
38 38
39</div> 39</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 f01484702..a393c9d92 100644
--- a/client/src/app/+about/about-follows/about-follows.component.scss
+++ b/client/src/app/+about/about-follows/about-follows.component.scss
@@ -19,6 +19,7 @@ a {
19 19
20.showMore { 20.showMore {
21 @include peertube-button-link; 21 @include peertube-button-link;
22 padding: 0; 22 @include grey-button;
23 text-align: left; 23
24 margin-top: 1%;
24} 25}
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 bdee5cf78..b808c1ac9 100644
--- a/client/src/app/+about/about-follows/about-follows.component.ts
+++ b/client/src/app/+about/about-follows/about-follows.component.ts
@@ -22,13 +22,13 @@ export class AboutFollowsComponent implements OnInit {
22 followersPagination: ComponentPagination = { 22 followersPagination: ComponentPagination = {
23 currentPage: 1, 23 currentPage: 1,
24 itemsPerPage: 20, 24 itemsPerPage: 20,
25 totalItems: null 25 totalItems: 0
26 } 26 }
27 27
28 followingsPagination: ComponentPagination = { 28 followingsPagination: ComponentPagination = {
29 currentPage: 1, 29 currentPage: 1,
30 itemsPerPage: 20, 30 itemsPerPage: 20,
31 totalItems: null 31 totalItems: 0
32 } 32 }
33 33
34 sort: SortMeta = { 34 sort: SortMeta = {