aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+accounts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+accounts')
-rw-r--r--client/src/app/+accounts/account-video-channels/account-video-channels.component.html2
-rw-r--r--client/src/app/+accounts/account-video-channels/account-video-channels.component.ts30
2 files changed, 16 insertions, 16 deletions
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.html b/client/src/app/+accounts/account-video-channels/account-video-channels.component.html
index 73bac5f1d..5dbb341d2 100644
--- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.html
+++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.html
@@ -21,7 +21,7 @@
21 21
22 <my-video-miniature 22 <my-video-miniature
23 *ngFor="let video of getVideosOf(videoChannel)" 23 *ngFor="let video of getVideosOf(videoChannel)"
24 [video]="video" [user]="user" [displayVideoActions]="true" 24 [video]="video" [user]="userMiniature" [displayVideoActions]="true"
25 ></my-video-miniature> 25 ></my-video-miniature>
26 </div> 26 </div>
27 27
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
index 5572064c1..2e5c5aae2 100644
--- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
+++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
@@ -1,17 +1,17 @@
1import { from, Subject, Subscription } from 'rxjs'
2import { concatMap, map, switchMap, tap } from 'rxjs/operators'
1import { Component, OnDestroy, OnInit } from '@angular/core' 3import { Component, OnDestroy, OnInit } from '@angular/core'
2import { ActivatedRoute } from '@angular/router' 4import { UserService } from '@app/shared'
3import { Account } from '@app/shared/account/account.model' 5import { Account } from '@app/shared/account/account.model'
4import { AccountService } from '@app/shared/account/account.service' 6import { AccountService } from '@app/shared/account/account.service'
5import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' 7import { ScreenService } from '@app/shared/misc/screen.service'
6import { concatMap, map, switchMap, tap } from 'rxjs/operators' 8import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model'
7import { from, Subject, Subscription } from 'rxjs'
8import { VideoChannel } from '@app/shared/video-channel/video-channel.model' 9import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
10import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
11import { VideoSortField } from '@app/shared/video/sort-field.type'
9import { Video } from '@app/shared/video/video.model' 12import { Video } from '@app/shared/video/video.model'
10import { AuthService } from '@app/core'
11import { VideoService } from '@app/shared/video/video.service' 13import { VideoService } from '@app/shared/video/video.service'
12import { VideoSortField } from '@app/shared/video/sort-field.type' 14import { User } from '@shared/models'
13import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model'
14import { ScreenService } from '@app/shared/misc/screen.service'
15 15
16@Component({ 16@Component({
17 selector: 'my-account-video-channels', 17 selector: 'my-account-video-channels',
@@ -38,21 +38,18 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy {
38 38
39 onChannelDataSubject = new Subject<any>() 39 onChannelDataSubject = new Subject<any>()
40 40
41 userMiniature: User
42
41 private accountSub: Subscription 43 private accountSub: Subscription
42 44
43 constructor ( 45 constructor (
44 private route: ActivatedRoute,
45 private authService: AuthService,
46 private accountService: AccountService, 46 private accountService: AccountService,
47 private videoChannelService: VideoChannelService, 47 private videoChannelService: VideoChannelService,
48 private videoService: VideoService, 48 private videoService: VideoService,
49 private screenService: ScreenService 49 private screenService: ScreenService,
50 private userService: UserService
50 ) { } 51 ) { }
51 52
52 get user () {
53 return this.authService.getUser()
54 }
55
56 ngOnInit () { 53 ngOnInit () {
57 // Parent get the account for us 54 // Parent get the account for us
58 this.accountSub = this.accountService.accountLoaded 55 this.accountSub = this.accountService.accountLoaded
@@ -61,6 +58,9 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy {
61 58
62 this.loadMoreChannels() 59 this.loadMoreChannels()
63 }) 60 })
61
62 this.userService.getAnonymousOrLoggedUser()
63 .subscribe(user => this.userMiniature = user)
64 } 64 }
65 65
66 ngOnDestroy () { 66 ngOnDestroy () {