aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-02-22 14:38:57 +0100
committerChocobozzz <me@florianbigard.com>2022-02-22 14:38:57 +0100
commit1d54b2052c2144a9c3811fab6d641ee8ddeb1085 (patch)
treece51d0430ac8a419bf4bce60d8ec9e098a203479 /client
parent6ea9295b8f5dd7cc254202a79aad61c666cc4259 (diff)
downloadPeerTube-1d54b2052c2144a9c3811fab6d641ee8ddeb1085.tar.gz
PeerTube-1d54b2052c2144a9c3811fab6d641ee8ddeb1085.tar.zst
PeerTube-1d54b2052c2144a9c3811fab6d641ee8ddeb1085.zip
Hide remote subscribe if logged in
Diffstat (limited to 'client')
-rw-r--r--client/src/app/shared/shared-user-subscription/subscribe-button.component.html2
-rw-r--r--client/src/app/shared/shared-user-subscription/subscribe-button.component.ts4
2 files changed, 5 insertions, 1 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 d8699ff69..d08d7f4ed 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
@@ -58,7 +58,7 @@
58 <span *ngIf="isUserLoggedIn()" i18n>Subscribe with your local account</span> 58 <span *ngIf="isUserLoggedIn()" i18n>Subscribe with your local account</span>
59 </button> 59 </button>
60 60
61 <button class="dropdown-item dropdown-item-neutral"> 61 <button *ngIf="isRemoteSubscribeAvailable()" class="dropdown-item dropdown-item-neutral">
62 <div class="mb-1" i18n>Subscribe with a remote account:</div> 62 <div class="mb-1" i18n>Subscribe with a remote account:</div>
63 <my-remote-subscribe [showHelp]="true" [uri]="uri"></my-remote-subscribe> 63 <my-remote-subscribe [showHelp]="true" [uri]="uri"></my-remote-subscribe>
64 </button> 64 </button>
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 180bc0565..7a55a6ffb 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
@@ -168,6 +168,10 @@ export class SubscribeButtonComponent implements OnInit, OnChanges {
168 return Array.from(this.subscribed.values()).every(v => v === true) 168 return Array.from(this.subscribed.values()).every(v => v === true)
169 } 169 }
170 170
171 isRemoteSubscribeAvailable () {
172 return !this.isUserLoggedIn()
173 }
174
171 private getChannelHandler (videoChannel: VideoChannel) { 175 private getChannelHandler (videoChannel: VideoChannel) {
172 return videoChannel.name + '@' + videoChannel.host 176 return videoChannel.name + '@' + videoChannel.host
173 } 177 }