diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-16 11:00:35 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-06-16 11:26:46 +0200 |
commit | 5c20a45518c3afc40c9494cad4a78def92e5e288 (patch) | |
tree | d4f6894b37394f3a40e6c58d34012bc55c05f55e /client/src/app/+accounts/account-video-channels/account-video-channels.component.ts | |
parent | 64e0f8cf12c804a7a2fa582fd954f686cea9a45b (diff) | |
download | PeerTube-5c20a45518c3afc40c9494cad4a78def92e5e288.tar.gz PeerTube-5c20a45518c3afc40c9494cad4a78def92e5e288.tar.zst PeerTube-5c20a45518c3afc40c9494cad4a78def92e5e288.zip |
Fix anonymous nsfw policy
Diffstat (limited to 'client/src/app/+accounts/account-video-channels/account-video-channels.component.ts')
-rw-r--r-- | client/src/app/+accounts/account-video-channels/account-video-channels.component.ts | 30 |
1 files changed, 15 insertions, 15 deletions
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 () { |