diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-19 11:01:34 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-19 11:01:34 +0200 |
commit | 0883b3245bf0deb9106c4041e9afbd3521b79280 (patch) | |
tree | fcb73005e0b31a3b763ee5d22d5fc39c2da89907 /client/src/app/videos | |
parent | 04ed10b21e8e1339514faae0bb690e4d97c23b0a (diff) | |
download | PeerTube-0883b3245bf0deb9106c4041e9afbd3521b79280.tar.gz PeerTube-0883b3245bf0deb9106c4041e9afbd3521b79280.tar.zst PeerTube-0883b3245bf0deb9106c4041e9afbd3521b79280.zip |
Add ability to choose what policy we have for NSFW videos
There is a global instance setting and a per user setting
Diffstat (limited to 'client/src/app/videos')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index 182703cdf..6f6f02378 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -22,6 +22,7 @@ import { VideoDownloadComponent } from './modal/video-download.component' | |||
22 | import { VideoReportComponent } from './modal/video-report.component' | 22 | import { VideoReportComponent } from './modal/video-report.component' |
23 | import { VideoShareComponent } from './modal/video-share.component' | 23 | import { VideoShareComponent } from './modal/video-share.component' |
24 | import { getVideojsOptions } from '../../../assets/player/peertube-player' | 24 | import { getVideojsOptions } from '../../../assets/player/peertube-player' |
25 | import { ServerService } from '@app/core' | ||
25 | 26 | ||
26 | @Component({ | 27 | @Component({ |
27 | selector: 'my-video-watch', | 28 | selector: 'my-video-watch', |
@@ -66,6 +67,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
66 | private confirmService: ConfirmService, | 67 | private confirmService: ConfirmService, |
67 | private metaService: MetaService, | 68 | private metaService: MetaService, |
68 | private authService: AuthService, | 69 | private authService: AuthService, |
70 | private serverService: ServerService, | ||
69 | private notificationsService: NotificationsService, | 71 | private notificationsService: NotificationsService, |
70 | private markdownService: MarkdownService, | 72 | private markdownService: MarkdownService, |
71 | private zone: NgZone, | 73 | private zone: NgZone, |
@@ -335,7 +337,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
335 | 337 | ||
336 | this.updateOtherVideosDisplayed() | 338 | this.updateOtherVideosDisplayed() |
337 | 339 | ||
338 | if (this.video.isVideoNSFWForUser(this.user)) { | 340 | if (this.video.isVideoNSFWForUser(this.user, this.serverService.getConfig())) { |
339 | const res = await this.confirmService.confirm( | 341 | const res = await this.confirmService.confirm( |
340 | 'This video contains mature or explicit content. Are you sure you want to watch it?', | 342 | 'This video contains mature or explicit content. Are you sure you want to watch it?', |
341 | 'Mature or explicit content' | 343 | 'Mature or explicit content' |