]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/user-subscription/subscribe-button.component.html
Strict templates enabled
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / user-subscription / subscribe-button.component.html
index 275349b7f379263512e7635ed548d74b15cc8df1..85b3d1fdb2879569db5ef73c7b6f3ddb5a0d15a7 100644 (file)
@@ -1,31 +1,31 @@
 <div class="btn-group-subscribe btn-group"
-    [ngClass]="{'subscribe-button': !isAllChannelsSubscribed(), 'unsubscribe-button': isAllChannelsSubscribed(), 'big': isBigButton() }">
+    [ngClass]="{'subscribe-button': !isAllChannelsSubscribed, 'unsubscribe-button': isAllChannelsSubscribed, 'big': isBigButton }">
 
   <ng-template #userLoggedOut>
-    <span [ngClass]="{ 'extra-text': isAtLeastOneChannelSubscribed() }">
+    <span [ngClass]="{ 'extra-text': isAtLeastOneChannelSubscribed }">
       <ng-container *ngIf="account; then multiple; else single"></ng-container>
       <ng-template i18n #single>Subscribe</ng-template>
       <ng-template #multiple>
         <span i18n>Subscribe to all channels</span>
-        <span *ngIf="isAtLeastOneChannelSubscribed()">{{subscribeStatus(true).length}}/{{subscribed.size}} 
+        <span *ngIf="isAtLeastOneChannelSubscribed">{{ subscribeStatus(true).length }}/{{ subscribed.size }}
           <ng-container i18n>channels subscribed</ng-container>
         </span>
       </ng-template>
     </span>
-    <span *ngIf="displayFollowers && videoChannel.followersCount !== 0" class="followers-count">
-      {{ videoChannel.followersCount | myNumberFormatter }}
+    <span *ngIf="!isBigButton && displayFollowers && videoChannels.length > 1 && videoChannel.followersCount !== 0" class="followers-count">
+      {{ videoChannels[0].followersCount | myNumberFormatter }}
     </span>
   </ng-template>
 
   <ng-template #userLoggedIn>
-    <button *ngIf="!isAllChannelsSubscribed()" type="button"
+    <button *ngIf="!isAllChannelsSubscribed" type="button"
             class="btn btn-sm" role="button"
             (click)="subscribe()">
       <ng-template [ngTemplateOutlet]="userLoggedOut"></ng-template>
     </button>
-  
+
     <button
-      *ngIf="isAllChannelsSubscribed()" type="button"
+      *ngIf="isAllChannelsSubscribed" type="button"
       class="btn btn-sm" role="button"
       (click)="unsubscribe()">
       <ng-container i18n>{account + "", select, undefined {Unsubscribe} other {Unsubscribe from all channels}}</ng-container>
       <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>
 
-      <button class="dropdown-item" i18n>Subscribe with a Mastodon account:</button>
-      <my-remote-subscribe showHelp="true" [uri]="channelUri"></my-remote-subscribe>
+      <button class="dropdown-item dropdown-item-neutral" i18n>Subscribe with a Mastodon account:</button>
+      <my-remote-subscribe [showHelp]="true" [uri]="uri"></my-remote-subscribe>
 
       <div class="dropdown-divider"></div>