aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-04-14 09:42:50 +0200
committerChocobozzz <me@florianbigard.com>2023-04-14 09:42:50 +0200
commitd15531fb3567f2f27229d3086ffd48069ca73315 (patch)
tree48c29a05fd6f2d3b293d408778e7de9292e04732 /client/src/app
parent848347f193ca43f098e77b321f6555bd4a143e62 (diff)
downloadPeerTube-d15531fb3567f2f27229d3086ffd48069ca73315.tar.gz
PeerTube-d15531fb3567f2f27229d3086ffd48069ca73315.tar.zst
PeerTube-d15531fb3567f2f27229d3086ffd48069ca73315.zip
Fix follow links
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/+about/about-follows/about-follows.component.html8
-rw-r--r--client/src/app/+about/about-follows/about-follows.component.ts15
2 files changed, 13 insertions, 10 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 fd4109416..37571dfa4 100644
--- a/client/src/app/+about/about-follows/about-follows.component.html
+++ b/client/src/app/+about/about-follows/about-follows.component.html
@@ -6,8 +6,8 @@
6 6
7 <div i18n class="no-results" *ngIf="followersPagination.totalItems === 0">{{ instanceName }} does not have followers.</div> 7 <div i18n class="no-results" *ngIf="followersPagination.totalItems === 0">{{ instanceName }} does not have followers.</div>
8 8
9 <a *ngFor="let follower of followers" [href]="buildLink(follower)" target="_blank" rel="noopener noreferrer"> 9 <a *ngFor="let follower of followers" [href]="follower.url" target="_blank" rel="noopener noreferrer">
10 {{ follower }} 10 {{ follower.name }}
11 </a> 11 </a>
12 12
13 <button i18n class="peertube-button-link grey-button mt-1" *ngIf="!loadedAllFollowers && canLoadMoreFollowers()" (click)="loadAllFollowers()">Show full list</button> 13 <button i18n class="peertube-button-link grey-button mt-1" *ngIf="!loadedAllFollowers && canLoadMoreFollowers()" (click)="loadAllFollowers()">Show full list</button>
@@ -18,8 +18,8 @@
18 18
19 <div i18n class="no-results" *ngIf="followingsPagination.totalItems === 0">{{ instanceName }} does not have subscriptions.</div> 19 <div i18n class="no-results" *ngIf="followingsPagination.totalItems === 0">{{ instanceName }} does not have subscriptions.</div>
20 20
21 <a *ngFor="let following of followings" [href]="buildLink(following)" target="_blank" rel="noopener noreferrer"> 21 <a *ngFor="let following of followings" [href]="following.url" target="_blank" rel="noopener noreferrer">
22 {{ following }} 22 {{ following.name }}
23 </a> 23 </a>
24 24
25 <button i18n class="peertube-button-link grey-button mt-1" *ngIf="!loadedAllFollowings && canLoadMoreFollowings()" (click)="loadAllFollowings()">Show full list</button> 25 <button i18n class="peertube-button-link grey-button mt-1" *ngIf="!loadedAllFollowings && canLoadMoreFollowings()" (click)="loadAllFollowings()">Show full list</button>
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 35d810388..e1df8b813 100644
--- a/client/src/app/+about/about-follows/about-follows.component.ts
+++ b/client/src/app/+about/about-follows/about-follows.component.ts
@@ -13,8 +13,8 @@ import { Actor } from '@shared/models/actors'
13export class AboutFollowsComponent implements OnInit { 13export class AboutFollowsComponent implements OnInit {
14 instanceName: string 14 instanceName: string
15 15
16 followers: string[] = [] 16 followers: { name: string, url: string }[] = []
17 followings: string[] = [] 17 followings: { name: string, url: string }[] = []
18 18
19 loadedAllFollowers = false 19 loadedAllFollowers = false
20 loadedAllFollowings = false 20 loadedAllFollowings = false
@@ -130,10 +130,13 @@ export class AboutFollowsComponent implements OnInit {
130 } 130 }
131 131
132 private formatFollow (actor: Actor) { 132 private formatFollow (actor: Actor) {
133 // Instance follow, only display host 133 return {
134 if (actor.name === 'peertube') return actor.host 134 // Instance follow, only display host
135 name: actor.name === 'peertube'
136 ? actor.host
137 : actor.name + '@' + actor.host,
135 138
136 return actor.name + '@' + actor.host 139 url: actor.url
140 }
137 } 141 }
138
139} 142}