aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-user-subscription
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-02-14 11:47:01 +0100
committerChocobozzz <me@florianbigard.com>2023-02-14 11:51:44 +0100
commit98bd5e2256bfdeba6d5ab07f0421acfde1a0de26 (patch)
treea1193f1af10f0da7a532d4aa6d5045e51c3d16a9 /client/src/app/shared/shared-user-subscription
parent4ea827076df39935375d66fffb5e1e27e667111e (diff)
downloadPeerTube-98bd5e2256bfdeba6d5ab07f0421acfde1a0de26.tar.gz
PeerTube-98bd5e2256bfdeba6d5ab07f0421acfde1a0de26.tar.zst
PeerTube-98bd5e2256bfdeba6d5ab07f0421acfde1a0de26.zip
Refactor login redirection/button links
Correctly handle external auth redirection in all cases
Diffstat (limited to 'client/src/app/shared/shared-user-subscription')
-rw-r--r--client/src/app/shared/shared-user-subscription/subscribe-button.component.ts7
1 files changed, 3 insertions, 4 deletions
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 7a55a6ffb..a002bf4e7 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
@@ -1,7 +1,6 @@
1import { concat, forkJoin, merge } from 'rxjs' 1import { concat, forkJoin, merge } from 'rxjs'
2import { Component, Input, OnChanges, OnInit } from '@angular/core' 2import { Component, Input, OnChanges, OnInit } from '@angular/core'
3import { Router } from '@angular/router' 3import { AuthService, Notifier, RedirectService } from '@app/core'
4import { AuthService, Notifier } from '@app/core'
5import { Account, VideoChannel, VideoService } from '@app/shared/shared-main' 4import { Account, VideoChannel, VideoService } from '@app/shared/shared-main'
6import { FeedFormat } from '@shared/models' 5import { FeedFormat } from '@shared/models'
7import { UserSubscriptionService } from './user-subscription.service' 6import { UserSubscriptionService } from './user-subscription.service'
@@ -27,7 +26,7 @@ export class SubscribeButtonComponent implements OnInit, OnChanges {
27 26
28 constructor ( 27 constructor (
29 private authService: AuthService, 28 private authService: AuthService,
30 private router: Router, 29 private redirectService: RedirectService,
31 private notifier: Notifier, 30 private notifier: Notifier,
32 private userSubscriptionService: UserSubscriptionService, 31 private userSubscriptionService: UserSubscriptionService,
33 private videoService: VideoService 32 private videoService: VideoService
@@ -152,7 +151,7 @@ export class SubscribeButtonComponent implements OnInit, OnChanges {
152 } 151 }
153 152
154 gotoLogin () { 153 gotoLogin () {
155 this.router.navigate([ '/login' ]) 154 this.redirectService.redirectToLogin()
156 } 155 }
157 156
158 subscribeStatus (subscribed: boolean) { 157 subscribeStatus (subscribed: boolean) {