aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/video-miniature.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/video/video-miniature.component.ts')
-rw-r--r--client/src/app/shared/video/video-miniature.component.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/client/src/app/shared/video/video-miniature.component.ts b/client/src/app/shared/video/video-miniature.component.ts
index d5c7dfd9b..9fffc7ddb 100644
--- a/client/src/app/shared/video/video-miniature.component.ts
+++ b/client/src/app/shared/video/video-miniature.component.ts
@@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Inject, Input, LOCALE
2import { User } from '../users' 2import { User } from '../users'
3import { Video } from './video.model' 3import { Video } from './video.model'
4import { ServerService } from '@app/core' 4import { ServerService } from '@app/core'
5import { VideoPrivacy, VideoState } from '../../../../../shared' 5import { ServerConfig, VideoPrivacy, VideoState } from '../../../../../shared'
6import { I18n } from '@ngx-translate/i18n-polyfill' 6import { I18n } from '@ngx-translate/i18n-polyfill'
7import { VideoActionsDisplayType } from '@app/shared/video/video-actions-dropdown.component' 7import { VideoActionsDisplayType } from '@app/shared/video/video-actions-dropdown.component'
8import { ScreenService } from '@app/shared/misc/screen.service' 8import { ScreenService } from '@app/shared/misc/screen.service'
@@ -55,6 +55,7 @@ export class VideoMiniatureComponent implements OnInit {
55 report: true 55 report: true
56 } 56 }
57 showActions = false 57 showActions = false
58 serverConfig: ServerConfig
58 59
59 private ownerDisplayTypeChosen: 'account' | 'videoChannel' 60 private ownerDisplayTypeChosen: 'account' | 'videoChannel'
60 61
@@ -66,10 +67,14 @@ export class VideoMiniatureComponent implements OnInit {
66 ) { } 67 ) { }
67 68
68 get isVideoBlur () { 69 get isVideoBlur () {
69 return this.video.isVideoNSFWForUser(this.user, this.serverService.getConfig()) 70 return this.video.isVideoNSFWForUser(this.user, this.serverConfig)
70 } 71 }
71 72
72 ngOnInit () { 73 ngOnInit () {
74 this.serverConfig = this.serverService.getTmpConfig()
75 this.serverService.getConfig()
76 .subscribe(config => this.serverConfig = config)
77
73 this.setUpBy() 78 this.setUpBy()
74 79
75 // We rely on mouseenter to lazy load actions 80 // We rely on mouseenter to lazy load actions