aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+accounts/accounts.component.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-01-07 23:51:14 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-01-10 10:12:09 +0100
commit41eb700fceee1085dd0e1a9ce78ecbd0e111eb6e (patch)
tree41d39a5e8604cd769e9487d5046876629c638316 /client/src/app/+accounts/accounts.component.ts
parentfc2df421a99e87ad20ca1f758491b6af476efd56 (diff)
downloadPeerTube-41eb700fceee1085dd0e1a9ce78ecbd0e111eb6e.tar.gz
PeerTube-41eb700fceee1085dd0e1a9ce78ecbd0e111eb6e.tar.zst
PeerTube-41eb700fceee1085dd0e1a9ce78ecbd0e111eb6e.zip
Refactor my-subscribe-button to support full account subscription
Diffstat (limited to 'client/src/app/+accounts/accounts.component.ts')
-rw-r--r--client/src/app/+accounts/accounts.component.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts
index 3118d7562..e3a503f4c 100644
--- a/client/src/app/+accounts/accounts.component.ts
+++ b/client/src/app/+accounts/accounts.component.ts
@@ -8,6 +8,8 @@ import { Subscription } from 'rxjs'
8import { AuthService, Notifier, RedirectService } from '@app/core' 8import { AuthService, Notifier, RedirectService } from '@app/core'
9import { User, UserRight } from '../../../../shared' 9import { User, UserRight } from '../../../../shared'
10import { I18n } from '@ngx-translate/i18n-polyfill' 10import { I18n } from '@ngx-translate/i18n-polyfill'
11import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
12import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
11 13
12@Component({ 14@Component({
13 templateUrl: './accounts.component.html', 15 templateUrl: './accounts.component.html',
@@ -16,6 +18,7 @@ import { I18n } from '@ngx-translate/i18n-polyfill'
16export class AccountsComponent implements OnInit, OnDestroy { 18export class AccountsComponent implements OnInit, OnDestroy {
17 account: Account 19 account: Account
18 user: User 20 user: User
21 videoChannels: VideoChannel[]
19 22
20 private routeSub: Subscription 23 private routeSub: Subscription
21 24
@@ -23,6 +26,7 @@ export class AccountsComponent implements OnInit, OnDestroy {
23 private route: ActivatedRoute, 26 private route: ActivatedRoute,
24 private userService: UserService, 27 private userService: UserService,
25 private accountService: AccountService, 28 private accountService: AccountService,
29 private videoChannelService: VideoChannelService,
26 private notifier: Notifier, 30 private notifier: Notifier,
27 private restExtractor: RestExtractor, 31 private restExtractor: RestExtractor,
28 private redirectService: RedirectService, 32 private redirectService: RedirectService,
@@ -40,7 +44,11 @@ export class AccountsComponent implements OnInit, OnDestroy {
40 catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 404 ])) 44 catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 404 ]))
41 ) 45 )
42 .subscribe( 46 .subscribe(
43 account => this.account = account, 47 account => {
48 this.account = account
49 this.videoChannelService.listAccountVideoChannels(account)
50 .subscribe(videoChannels => this.videoChannels = videoChannels.data)
51 },
44 52
45 err => this.notifier.error(err.message) 53 err => this.notifier.error(err.message)
46 ) 54 )