mirror of https://github.com/Chocobozzz/PeerTube
66 lines
2.4 KiB
HTML
66 lines
2.4 KiB
HTML
<div class="btn-group-subscribe btn-group"
|
|
[ngClass]="{'subscribe-button': !isAllChannelsSubscribed(), 'unsubscribe-button': isAllChannelsSubscribed()}">
|
|
|
|
<ng-template #userLoggedOut>
|
|
<span>
|
|
<ng-container *ngIf="account; then multiple; else single"></ng-container>
|
|
<ng-template i18n #single>Subscribe</ng-template>
|
|
<ng-template i18n #multiple>Subscribe to all channels</ng-template>
|
|
</span>
|
|
<span *ngIf="displayFollowers && videoChannel.followersCount !== 0" class="followers-count">
|
|
{{ videoChannel.followersCount | myNumberFormatter }}
|
|
</span>
|
|
</ng-template>
|
|
|
|
<ng-template #userLoggedIn>
|
|
<button *ngIf="!isAllChannelsSubscribed()" type="button"
|
|
class="btn btn-sm" role="button"
|
|
(click)="subscribe()">
|
|
<ng-template [ngTemplateOutlet]="userLoggedOut"></ng-template>
|
|
</button>
|
|
|
|
<button
|
|
*ngIf="isAllChannelsSubscribed()" type="button"
|
|
class="btn btn-sm" role="button"
|
|
(click)="unsubscribe()" i18n
|
|
>
|
|
<ng-container *ngIf="account; then multiple; else single"></ng-container>
|
|
<ng-template i18n #single>Unsubscribe</ng-template>
|
|
<ng-template i18n #multiple>Unsubscribe from all channels</ng-template>
|
|
</button>
|
|
</ng-template>
|
|
|
|
<ng-container
|
|
*ngIf="isUserLoggedIn(); then userLoggedIn">
|
|
</ng-container>
|
|
|
|
<div class="btn-group" ngbDropdown autoClose="outside"
|
|
placement="bottom-right" role="group"
|
|
aria-label="Multiple ways to subscribe to the current channel">
|
|
<button class="btn btn-sm dropdown-toggle-split" ngbDropdownToggle>
|
|
<ng-container
|
|
*ngIf="!isUserLoggedIn(); then userLoggedOut">
|
|
</ng-container>
|
|
</button>
|
|
|
|
<div class="dropdown-menu" ngbDropdownMenu>
|
|
|
|
<h6 class="dropdown-header" i18n>Using an ActivityPub account</h6>
|
|
|
|
<button class="dropdown-item" (click)="subscribe()">
|
|
<span *ngIf="!isUserLoggedIn()" i18n>Subscribe with an account on {{ videoChannel.host }}</span>
|
|
<span *ngIf="isUserLoggedIn()" i18n>Subscribe with your local account</span>
|
|
</button>
|
|
|
|
<button class="dropdown-item" i18n>Subscribe with a Mastodon account:</button>
|
|
<my-remote-subscribe showHelp="true" [uri]="channelUri"></my-remote-subscribe>
|
|
|
|
<div class="dropdown-divider"></div>
|
|
|
|
<h6 class="dropdown-header" i18n>Using a syndication feed</h6>
|
|
<a [href]="rssUri" target="_blank" class="dropdown-item" i18n>Subscribe via RSS</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|