1
0
Fork 0

Hide remote subscribe if logged in

This commit is contained in:
Chocobozzz 2022-02-22 14:38:57 +01:00
parent 6ea9295b8f
commit 1d54b2052c
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 5 additions and 1 deletions

View File

@ -58,7 +58,7 @@
<span *ngIf="isUserLoggedIn()" i18n>Subscribe with your local account</span>
</button>
<button class="dropdown-item dropdown-item-neutral">
<button *ngIf="isRemoteSubscribeAvailable()" class="dropdown-item dropdown-item-neutral">
<div class="mb-1" i18n>Subscribe with a remote account:</div>
<my-remote-subscribe [showHelp]="true" [uri]="uri"></my-remote-subscribe>
</button>

View File

@ -168,6 +168,10 @@ export class SubscribeButtonComponent implements OnInit, OnChanges {
return Array.from(this.subscribed.values()).every(v => v === true)
}
isRemoteSubscribeAvailable () {
return !this.isUserLoggedIn()
}
private getChannelHandler (videoChannel: VideoChannel) {
return videoChannel.name + '@' + videoChannel.host
}