diff options
Diffstat (limited to 'client/src/app/+accounts')
-rw-r--r-- | client/src/app/+accounts/account-video-channels/account-video-channels.component.html | 2 | ||||
-rw-r--r-- | client/src/app/+accounts/account-video-channels/account-video-channels.component.ts | 30 |
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 @@ | |||
1 | import { from, Subject, Subscription } from 'rxjs' | ||
2 | import { concatMap, map, switchMap, tap } from 'rxjs/operators' | ||
1 | import { Component, OnDestroy, OnInit } from '@angular/core' | 3 | import { Component, OnDestroy, OnInit } from '@angular/core' |
2 | import { ActivatedRoute } from '@angular/router' | 4 | import { UserService } from '@app/shared' |
3 | import { Account } from '@app/shared/account/account.model' | 5 | import { Account } from '@app/shared/account/account.model' |
4 | import { AccountService } from '@app/shared/account/account.service' | 6 | import { AccountService } from '@app/shared/account/account.service' |
5 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | 7 | import { ScreenService } from '@app/shared/misc/screen.service' |
6 | import { concatMap, map, switchMap, tap } from 'rxjs/operators' | 8 | import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' |
7 | import { from, Subject, Subscription } from 'rxjs' | ||
8 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 9 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
10 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | ||
11 | import { VideoSortField } from '@app/shared/video/sort-field.type' | ||
9 | import { Video } from '@app/shared/video/video.model' | 12 | import { Video } from '@app/shared/video/video.model' |
10 | import { AuthService } from '@app/core' | ||
11 | import { VideoService } from '@app/shared/video/video.service' | 13 | import { VideoService } from '@app/shared/video/video.service' |
12 | import { VideoSortField } from '@app/shared/video/sort-field.type' | 14 | import { User } from '@shared/models' |
13 | import { ComponentPagination, hasMoreItems } from '@app/shared/rest/component-pagination.model' | ||
14 | import { 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 () { |