Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix subscribe-button for logged-out users

Rigel Kent2d0d88a0cbd8
diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.html b/client/src/app/shared/user-subscription/subscribe-button.component.html
index 275349b7f3..1c2288ebb0 100644
--- a/client/src/app/shared/user-subscription/subscribe-button.component.html
+++ b/client/src/app/shared/user-subscription/subscribe-button.component.html
@@ -12,8 +12,8 @@
</span>
</ng-template>
</span>
- <span *ngIf="displayFollowers && videoChannel.followersCount !== 0" class="followers-count">
- {{ videoChannel.followersCount | myNumberFormatter }}
+ <span *ngIf="!isBigButton() && displayFollowers && videoChannels.length > 1 && videoChannels[0].followersCount !== 0" class="followers-count">
+ {{ videoChannels[0].followersCount | myNumberFormatter }}
</span>
</ng-template>
@@ -50,7 +50,7 @@
<h6 class="dropdown-header" i18n>Using an ActivityPub account</h6>
<button class="dropdown-item" (click)="subscribe()">
- <span *ngIf="!isUserLoggedIn()" i18n>Subscribe with an account on {{ videoChannel.host }}</span>
+ <span *ngIf="!isUserLoggedIn()" i18n>Subscribe with an account on this instance</span>
<span *ngIf="isUserLoggedIn()" i18n>Subscribe with your local account</span>
</button>
diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.ts b/client/src/app/shared/user-subscription/subscribe-button.component.ts
index 14a6bfe66e..1ebfdc82ff 100644
--- a/client/src/app/shared/user-subscription/subscribe-button.component.ts
+++ b/client/src/app/shared/user-subscription/subscribe-button.component.ts
@@ -146,7 +146,7 @@ export class SubscribeButtonComponent implements OnInit {
}
isBigButton () {
- return this.videoChannels.length > 1 && this.isAtLeastOneChannelSubscribed()
+ return this.isUserLoggedIn() && this.videoChannels.length > 1 && this.isAtLeastOneChannelSubscribed()
}
gotoLogin () {