aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-watch
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-01-23 22:16:48 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-01-23 22:18:53 +0100
commit11ac88de40215783835cf6e6259ff0f6cee258dd (patch)
tree9bdb69c0a4e3621b9b185d30a8a63f1ac6e8fbfa /client/src/app/videos/video-watch
parent4f8c0eb0e9356ee2782ea6eb12a92e4dc5f66127 (diff)
downloadPeerTube-11ac88de40215783835cf6e6259ff0f6cee258dd.tar.gz
PeerTube-11ac88de40215783835cf6e6259ff0f6cee258dd.tar.zst
PeerTube-11ac88de40215783835cf6e6259ff0f6cee258dd.zip
Client: add basic support to report video abuses
Diffstat (limited to 'client/src/app/videos/video-watch')
-rw-r--r--client/src/app/videos/video-watch/video-report.component.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/client/src/app/videos/video-watch/video-report.component.ts b/client/src/app/videos/video-watch/video-report.component.ts
index 7bc1677ab..7a125f53e 100644
--- a/client/src/app/videos/video-watch/video-report.component.ts
+++ b/client/src/app/videos/video-watch/video-report.component.ts
@@ -3,7 +3,7 @@ import { FormBuilder, FormGroup } from '@angular/forms';
3 3
4import { ModalDirective } from 'ng2-bootstrap/modal'; 4import { ModalDirective } from 'ng2-bootstrap/modal';
5 5
6import { FormReactive, VIDEO_REPORT_REASON } from '../../shared'; 6import { FormReactive, VideoAbuseService, VIDEO_ABUSE_REASON } from '../../shared';
7import { Video, VideoService } from '../shared'; 7import { Video, VideoService } from '../shared';
8 8
9@Component({ 9@Component({
@@ -21,12 +21,12 @@ export class VideoReportComponent extends FormReactive implements OnInit {
21 reason: '' 21 reason: ''
22 }; 22 };
23 validationMessages = { 23 validationMessages = {
24 reason: VIDEO_REPORT_REASON.MESSAGES 24 reason: VIDEO_ABUSE_REASON.MESSAGES
25 }; 25 };
26 26
27 constructor( 27 constructor(
28 private formBuilder: FormBuilder, 28 private formBuilder: FormBuilder,
29 private videoService: VideoService 29 private videoAbuseService: VideoAbuseService
30 ) { 30 ) {
31 super(); 31 super();
32 } 32 }
@@ -37,7 +37,7 @@ export class VideoReportComponent extends FormReactive implements OnInit {
37 37
38 buildForm() { 38 buildForm() {
39 this.form = this.formBuilder.group({ 39 this.form = this.formBuilder.group({
40 reason: [ '', VIDEO_REPORT_REASON.VALIDATORS ] 40 reason: [ '', VIDEO_ABUSE_REASON.VALIDATORS ]
41 }); 41 });
42 42
43 this.form.valueChanges.subscribe(data => this.onValueChanged(data)); 43 this.form.valueChanges.subscribe(data => this.onValueChanged(data));
@@ -54,7 +54,7 @@ export class VideoReportComponent extends FormReactive implements OnInit {
54 report() { 54 report() {
55 const reason = this.form.value['reason'] 55 const reason = this.form.value['reason']
56 56
57 this.videoService.reportVideo(this.video.id, reason) 57 this.videoAbuseService.reportVideo(this.video.id, reason)
58 .subscribe( 58 .subscribe(
59 // TODO: move alert to beautiful notifications 59 // TODO: move alert to beautiful notifications
60 ok => { 60 ok => {