Fix subscribe-button for logged-out users
authorRigel Kent <sendmemail@rigelk.eu>
Fri, 10 Jan 2020 10:42:53 +0000 (11:42 +0100)
committerRigel Kent <sendmemail@rigelk.eu>
Fri, 10 Jan 2020 10:42:53 +0000 (11:42 +0100)
client/src/app/shared/user-subscription/subscribe-button.component.html
client/src/app/shared/user-subscription/subscribe-button.component.ts

index 275349b7f379263512e7635ed548d74b15cc8df1..1c2288ebb0e53c357ae6c26556e2d4e0f3e7c29b 100644 (file)
@@ -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>
 
index 14a6bfe66ed2493ba3667d3933eefc6a8d6179db..1ebfdc82ffad1f7a4916d711cbf371724b967a5d 100644 (file)
@@ -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 () {