]>
Commit | Line | Data |
---|---|---|
1916c966 | 1 | <div |
5b0ec7cd | 2 | class="btn-group-subscribe btn-group" role="group" |
1916c966 C |
3 | [ngClass]="{'subscribe-button': !isAllChannelsSubscribed, 'unsubscribe-button': isAllChannelsSubscribed, 'big': isBigButton }" |
4 | > | |
41eb700f RK |
5 | |
6 | <ng-template #userLoggedOut> | |
f8b65c22 | 7 | <span [ngClass]="{ 'extra-text': isAtLeastOneChannelSubscribed }"> |
41eb700f RK |
8 | <ng-container *ngIf="account; then multiple; else single"></ng-container> |
9 | <ng-template i18n #single>Subscribe</ng-template> | |
b061c8ed RK |
10 | <ng-template #multiple> |
11 | <span i18n>Subscribe to all channels</span> | |
f8b65c22 | 12 | <span *ngIf="isAtLeastOneChannelSubscribed">{{ subscribeStatus(true).length }}/{{ subscribed.size }} |
b061c8ed RK |
13 | <ng-container i18n>channels subscribed</ng-container> |
14 | </span> | |
15 | </ng-template> | |
660d11e9 | 16 | </span> |
f8b65c22 | 17 | <span *ngIf="!isBigButton && displayFollowers && videoChannels.length > 1 && videoChannel.followersCount !== 0" class="followers-count"> |
2d0d88a0 | 18 | {{ videoChannels[0].followersCount | myNumberFormatter }} |
660d11e9 | 19 | </span> |
41eb700f RK |
20 | </ng-template> |
21 | ||
22 | <ng-template #userLoggedIn> | |
5b0ec7cd | 23 | <button *ngIf="!isAllChannelsSubscribed" type="button" class="btn" (click)="subscribe()"> |
41eb700f RK |
24 | <ng-template [ngTemplateOutlet]="userLoggedOut"></ng-template> |
25 | </button> | |
db84cf89 | 26 | |
5b0ec7cd | 27 | <button *ngIf="isAllChannelsSubscribed" type="button" class="btn" role="button" (click)="unsubscribe()"> |
9270ccf6 | 28 | <ng-container i18n>{account + "", select, undefined {Unsubscribe} other {Unsubscribe from all channels}}</ng-container> |
41eb700f RK |
29 | </button> |
30 | </ng-template> | |
660d11e9 | 31 | |
41eb700f RK |
32 | <ng-container |
33 | *ngIf="isUserLoggedIn(); then userLoggedIn"> | |
34 | </ng-container> | |
39ba2e8e | 35 | |
1916c966 | 36 | <div |
dd298423 | 37 | class="btn-group" ngbDropdown autoClose="outside" placement="bottom-right bottom-left bottom auto" |
1916c966 C |
38 | role="group" aria-label="Multiple ways to subscribe to the current channel" i18n-aria-label |
39 | > | |
9c0cdc50 | 40 | <button class="btn dropdown-toggle-split last-in-group" ngbDropdownToggle aria-label="Open subscription dropdown" i18n-aria-label> |
41eb700f RK |
41 | <ng-container |
42 | *ngIf="!isUserLoggedIn(); then userLoggedOut"> | |
43 | </ng-container> | |
660d11e9 | 44 | </button> |
39ba2e8e | 45 | |
660d11e9 RK |
46 | <div class="dropdown-menu" ngbDropdownMenu> |
47 | ||
8be9f43a | 48 | <h6 class="dropdown-header" i18n>Using an ActivityPub account</h6> |
39ba2e8e | 49 | |
8be9f43a | 50 | <button class="dropdown-item" (click)="subscribe()"> |
2d0d88a0 | 51 | <span *ngIf="!isUserLoggedIn()" i18n>Subscribe with an account on this instance</span> |
660d11e9 RK |
52 | <span *ngIf="isUserLoggedIn()" i18n>Subscribe with your local account</span> |
53 | </button> | |
39ba2e8e | 54 | |
1d54b205 | 55 | <button *ngIf="isRemoteSubscribeAvailable()" class="dropdown-item dropdown-item-neutral"> |
d43c6b1f | 56 | <div class="mb-1" i18n>Subscribe with a remote account:</div> |
2522fea7 RK |
57 | <my-remote-subscribe [showHelp]="true" [uri]="uri"></my-remote-subscribe> |
58 | </button> | |
39ba2e8e | 59 | |
660d11e9 RK |
60 | <div class="dropdown-divider"></div> |
61 | ||
62 | <h6 class="dropdown-header" i18n>Using a syndication feed</h6> | |
405ec98b | 63 | <a [href]="rssUri" target="_blank" class="dropdown-item" i18n>Subscribe via RSS</a> |
660d11e9 RK |
64 | |
65 | </div> | |
66 | </div> | |
3ddb1ec5 | 67 | </div> |