diff options
Diffstat (limited to 'client/src/app/shared/shared-moderation/report-modals/video-report.component.ts')
-rw-r--r-- | client/src/app/shared/shared-moderation/report-modals/video-report.component.ts | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts index 278d60ac6..38dd92910 100644 --- a/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts +++ b/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts | |||
@@ -1,13 +1,11 @@ | |||
1 | import { mapValues, pickBy } from 'lodash-es' | 1 | import { mapValues, pickBy } from 'lodash-es' |
2 | import { buildVideoOrPlaylistEmbed } from 'src/assets/player/utils' | ||
3 | import { Component, Input, OnInit, ViewChild } from '@angular/core' | 2 | import { Component, Input, OnInit, ViewChild } from '@angular/core' |
4 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser' | 3 | import { DomSanitizer } from '@angular/platform-browser' |
5 | import { Notifier } from '@app/core' | 4 | import { Notifier } from '@app/core' |
6 | import { ABUSE_REASON_VALIDATOR } from '@app/shared/form-validators/abuse-validators' | 5 | import { ABUSE_REASON_VALIDATOR } from '@app/shared/form-validators/abuse-validators' |
7 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 6 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' |
8 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 7 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
9 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 8 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
10 | import { decorateVideoLink } from '@shared/core-utils' | ||
11 | import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' | 9 | import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' |
12 | import { AbusePredefinedReasonsString } from '@shared/models' | 10 | import { AbusePredefinedReasonsString } from '@shared/models' |
13 | import { Video } from '../../shared-main' | 11 | import { Video } from '../../shared-main' |
@@ -25,7 +23,6 @@ export class VideoReportComponent extends FormReactive implements OnInit { | |||
25 | 23 | ||
26 | error: string = null | 24 | error: string = null |
27 | predefinedReasons: { id: AbusePredefinedReasonsString, label: string, description?: string, help?: string }[] = [] | 25 | predefinedReasons: { id: AbusePredefinedReasonsString, label: string, description?: string, help?: string }[] = [] |
28 | embedHtml: SafeHtml | ||
29 | 26 | ||
30 | private openedModal: NgbModalRef | 27 | private openedModal: NgbModalRef |
31 | 28 | ||
@@ -55,20 +52,6 @@ export class VideoReportComponent extends FormReactive implements OnInit { | |||
55 | return this.form.get('timestamp').value | 52 | return this.form.get('timestamp').value |
56 | } | 53 | } |
57 | 54 | ||
58 | getVideoEmbed () { | ||
59 | return this.sanitizer.bypassSecurityTrustHtml( | ||
60 | buildVideoOrPlaylistEmbed( | ||
61 | decorateVideoLink({ | ||
62 | url: this.video.embedUrl, | ||
63 | title: false, | ||
64 | warningTitle: false | ||
65 | }), | ||
66 | |||
67 | this.video.name | ||
68 | ) | ||
69 | ) | ||
70 | } | ||
71 | |||
72 | ngOnInit () { | 55 | ngOnInit () { |
73 | this.buildForm({ | 56 | this.buildForm({ |
74 | reason: ABUSE_REASON_VALIDATOR, | 57 | reason: ABUSE_REASON_VALIDATOR, |
@@ -82,8 +65,6 @@ export class VideoReportComponent extends FormReactive implements OnInit { | |||
82 | }) | 65 | }) |
83 | 66 | ||
84 | this.predefinedReasons = this.abuseService.getPrefefinedReasons('video') | 67 | this.predefinedReasons = this.abuseService.getPrefefinedReasons('video') |
85 | |||
86 | this.embedHtml = this.getVideoEmbed() | ||
87 | } | 68 | } |
88 | 69 | ||
89 | show () { | 70 | show () { |