aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/user-subscription/subscribe-button.component.html
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-01-14 10:58:38 +0100
committerRigel Kent <sendmemail@rigelk.eu>2020-01-14 10:58:42 +0100
commitf8b65c22a9cbf60a1d359c6aa2744baede1ee05f (patch)
treedaa9c74e88e99c8eb3f52827e076f75e30d1ab21 /client/src/app/shared/user-subscription/subscribe-button.component.html
parent2ba5ac33548b809285025be307960e49e7b3947c (diff)
downloadPeerTube-f8b65c22a9cbf60a1d359c6aa2744baede1ee05f.tar.gz
PeerTube-f8b65c22a9cbf60a1d359c6aa2744baede1ee05f.tar.zst
PeerTube-f8b65c22a9cbf60a1d359c6aa2744baede1ee05f.zip
Fix OnInit for subscribe button
Fixing regression introduced in a004ff172638083d69ed1028d18c9b6222d24da6 that initialized component for accounts with no channels before changing the input a second time.
Diffstat (limited to 'client/src/app/shared/user-subscription/subscribe-button.component.html')
-rw-r--r--client/src/app/shared/user-subscription/subscribe-button.component.html12
1 files changed, 6 insertions, 6 deletions
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 7d33b0621..2a4df29f7 100644
--- a/client/src/app/shared/user-subscription/subscribe-button.component.html
+++ b/client/src/app/shared/user-subscription/subscribe-button.component.html
@@ -1,31 +1,31 @@
1<div class="btn-group-subscribe btn-group" 1<div class="btn-group-subscribe btn-group"
2 [ngClass]="{'subscribe-button': !isAllChannelsSubscribed(), 'unsubscribe-button': isAllChannelsSubscribed(), 'big': isBigButton() }"> 2 [ngClass]="{'subscribe-button': !isAllChannelsSubscribed, 'unsubscribe-button': isAllChannelsSubscribed, 'big': isBigButton }">
3 3
4 <ng-template #userLoggedOut> 4 <ng-template #userLoggedOut>
5 <span [ngClass]="{ 'extra-text': isAtLeastOneChannelSubscribed() }"> 5 <span [ngClass]="{ 'extra-text': isAtLeastOneChannelSubscribed }">
6 <ng-container *ngIf="account; then multiple; else single"></ng-container> 6 <ng-container *ngIf="account; then multiple; else single"></ng-container>
7 <ng-template i18n #single>Subscribe</ng-template> 7 <ng-template i18n #single>Subscribe</ng-template>
8 <ng-template #multiple> 8 <ng-template #multiple>
9 <span i18n>Subscribe to all channels</span> 9 <span i18n>Subscribe to all channels</span>
10 <span *ngIf="isAtLeastOneChannelSubscribed()">{{ subscribeStatus(true).length }}/{{ subscribed.size }} 10 <span *ngIf="isAtLeastOneChannelSubscribed">{{ subscribeStatus(true).length }}/{{ subscribed.size }}
11 <ng-container i18n>channels subscribed</ng-container> 11 <ng-container i18n>channels subscribed</ng-container>
12 </span> 12 </span>
13 </ng-template> 13 </ng-template>
14 </span> 14 </span>
15 <span *ngIf="!isBigButton() && displayFollowers && videoChannels.length > 1 && videoChannel.followersCount !== 0" class="followers-count"> 15 <span *ngIf="!isBigButton && displayFollowers && videoChannels.length > 1 && videoChannel.followersCount !== 0" class="followers-count">
16 {{ videoChannels[0].followersCount | myNumberFormatter }} 16 {{ videoChannels[0].followersCount | myNumberFormatter }}
17 </span> 17 </span>
18 </ng-template> 18 </ng-template>
19 19
20 <ng-template #userLoggedIn> 20 <ng-template #userLoggedIn>
21 <button *ngIf="!isAllChannelsSubscribed()" type="button" 21 <button *ngIf="!isAllChannelsSubscribed" type="button"
22 class="btn btn-sm" role="button" 22 class="btn btn-sm" role="button"
23 (click)="subscribe()"> 23 (click)="subscribe()">
24 <ng-template [ngTemplateOutlet]="userLoggedOut"></ng-template> 24 <ng-template [ngTemplateOutlet]="userLoggedOut"></ng-template>
25 </button> 25 </button>
26 26
27 <button 27 <button
28 *ngIf="isAllChannelsSubscribed()" type="button" 28 *ngIf="isAllChannelsSubscribed" type="button"
29 class="btn btn-sm" role="button" 29 class="btn btn-sm" role="button"
30 (click)="unsubscribe()"> 30 (click)="unsubscribe()">
31 <ng-container i18n>{account + "", select, undefined {Unsubscribe} other {Unsubscribe from all channels}}</ng-container> 31 <ng-container i18n>{account + "", select, undefined {Unsubscribe} other {Unsubscribe from all channels}}</ng-container>