aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-list/video-overview.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-06-16 11:00:35 +0200
committerChocobozzz <me@florianbigard.com>2020-06-16 11:26:46 +0200
commit5c20a45518c3afc40c9494cad4a78def92e5e288 (patch)
treed4f6894b37394f3a40e6c58d34012bc55c05f55e /client/src/app/videos/video-list/video-overview.component.ts
parent64e0f8cf12c804a7a2fa582fd954f686cea9a45b (diff)
downloadPeerTube-5c20a45518c3afc40c9494cad4a78def92e5e288.tar.gz
PeerTube-5c20a45518c3afc40c9494cad4a78def92e5e288.tar.zst
PeerTube-5c20a45518c3afc40c9494cad4a78def92e5e288.zip
Fix anonymous nsfw policy
Diffstat (limited to 'client/src/app/videos/video-list/video-overview.component.ts')
-rw-r--r--client/src/app/videos/video-list/video-overview.component.ts25
1 files changed, 14 insertions, 11 deletions
diff --git a/client/src/app/videos/video-list/video-overview.component.ts b/client/src/app/videos/video-list/video-overview.component.ts
index 101073949..8ff8400db 100644
--- a/client/src/app/videos/video-list/video-overview.component.ts
+++ b/client/src/app/videos/video-list/video-overview.component.ts
@@ -1,11 +1,11 @@
1import { Subject } from 'rxjs'
1import { Component, OnInit } from '@angular/core' 2import { Component, OnInit } from '@angular/core'
2import { AuthService, Notifier } from '@app/core' 3import { Notifier } from '@app/core'
3import { I18n } from '@ngx-translate/i18n-polyfill' 4import { User, UserService } from '@app/shared'
4import { VideosOverview } from '@app/shared/overview/videos-overview.model' 5import { ScreenService } from '@app/shared/misc/screen.service'
5import { OverviewService } from '@app/shared/overview' 6import { OverviewService } from '@app/shared/overview'
7import { VideosOverview } from '@app/shared/overview/videos-overview.model'
6import { Video } from '@app/shared/video/video.model' 8import { Video } from '@app/shared/video/video.model'
7import { ScreenService } from '@app/shared/misc/screen.service'
8import { Subject } from 'rxjs'
9 9
10@Component({ 10@Component({
11 selector: 'my-video-overview', 11 selector: 'my-video-overview',
@@ -18,6 +18,8 @@ export class VideoOverviewComponent implements OnInit {
18 overviews: VideosOverview[] = [] 18 overviews: VideosOverview[] = []
19 notResults = false 19 notResults = false
20 20
21 userMiniature: User
22
21 private loaded = false 23 private loaded = false
22 private currentPage = 1 24 private currentPage = 1
23 private maxPage = 20 25 private maxPage = 20
@@ -25,19 +27,20 @@ export class VideoOverviewComponent implements OnInit {
25 private isLoading = false 27 private isLoading = false
26 28
27 constructor ( 29 constructor (
28 private i18n: I18n,
29 private notifier: Notifier, 30 private notifier: Notifier,
30 private authService: AuthService, 31 private userService: UserService,
31 private overviewService: OverviewService, 32 private overviewService: OverviewService,
32 private screenService: ScreenService 33 private screenService: ScreenService
33 ) { } 34 ) { }
34 35
35 get user () {
36 return this.authService.getUser()
37 }
38
39 ngOnInit () { 36 ngOnInit () {
40 this.loadMoreResults() 37 this.loadMoreResults()
38
39 this.userService.getAnonymousOrLoggedUser()
40 .subscribe(user => this.userMiniature = user)
41
42 this.userService.listenAnonymousUpdate()
43 .subscribe(user => this.userMiniature = user)
41 } 44 }
42 45
43 buildVideoChannelBy (object: { videos: Video[] }) { 46 buildVideoChannelBy (object: { videos: Video[] }) {