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