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