diff options
Diffstat (limited to 'client/src/app/videos/+video-watch/modal/video-report.component.ts')
-rw-r--r-- | client/src/app/videos/+video-watch/modal/video-report.component.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/client/src/app/videos/+video-watch/modal/video-report.component.ts b/client/src/app/videos/+video-watch/modal/video-report.component.ts index 297afb19f..023387984 100644 --- a/client/src/app/videos/+video-watch/modal/video-report.component.ts +++ b/client/src/app/videos/+video-watch/modal/video-report.component.ts | |||
@@ -33,6 +33,18 @@ export class VideoReportComponent extends FormReactive implements OnInit { | |||
33 | super() | 33 | super() |
34 | } | 34 | } |
35 | 35 | ||
36 | get currentHost () { | ||
37 | return window.location.host | ||
38 | } | ||
39 | |||
40 | get originHost () { | ||
41 | if (this.isRemoteVideo()) { | ||
42 | return this.video.account.host | ||
43 | } | ||
44 | |||
45 | return '' | ||
46 | } | ||
47 | |||
36 | ngOnInit () { | 48 | ngOnInit () { |
37 | this.buildForm({ | 49 | this.buildForm({ |
38 | reason: this.videoAbuseValidatorsService.VIDEO_ABUSE_REASON | 50 | reason: this.videoAbuseValidatorsService.VIDEO_ABUSE_REASON |
@@ -61,4 +73,8 @@ export class VideoReportComponent extends FormReactive implements OnInit { | |||
61 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 73 | err => this.notificationsService.error(this.i18n('Error'), err.message) |
62 | ) | 74 | ) |
63 | } | 75 | } |
76 | |||
77 | isRemoteVideo () { | ||
78 | return !this.video.isLocal | ||
79 | } | ||
64 | } | 80 | } |