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