From 5cea8f956721038e280695aae1390198c0b8a1e1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 3 Oct 2023 10:20:29 +0200 Subject: Prevent remote subscribe on accounts Which is not supported by PeerTube --- .../shared-user-subscription/subscribe-button.component.html | 9 +++++---- .../shared-user-subscription/subscribe-button.component.ts | 6 +++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/client/src/app/shared/shared-user-subscription/subscribe-button.component.html b/client/src/app/shared/shared-user-subscription/subscribe-button.component.html index 341b83a04..d1d551c18 100644 --- a/client/src/app/shared/shared-user-subscription/subscribe-button.component.html +++ b/client/src/app/shared/shared-user-subscription/subscribe-button.component.html @@ -5,15 +5,16 @@ - - Subscribe - + Subscribe + + Subscribe to all channels {{ subscribeStatus(true).length }}/{{ subscribed.size }} channels subscribed - + + {{ videoChannels[0].followersCount | myNumberFormatter }} diff --git a/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts b/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts index 2a5751824..4e15f7bc0 100644 --- a/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts +++ b/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts @@ -76,6 +76,10 @@ export class SubscribeButtonComponent implements OnInit, OnChanges { return this.isUserLoggedIn() && this.videoChannels.length > 1 && this.isAtLeastOneChannelSubscribed } + get isSingleSubscribe () { + return !this.account + } + ngOnInit () { this.loadSubscribedStatus() } @@ -168,7 +172,7 @@ export class SubscribeButtonComponent implements OnInit, OnChanges { } isRemoteSubscribeAvailable () { - return !this.isUserLoggedIn() + return this.isSingleSubscribe && !this.isUserLoggedIn() } private getChannelHandler (videoChannel: VideoChannel) { -- cgit v1.2.3