Verified Commit a1b2f876 authored by Chocobozzz's avatar Chocobozzz
Browse files

Add information in report modal

parent 9c53ef67
......@@ -6,6 +6,11 @@
<div class="modal-body">
<div i18n class="information">
Your report will be sent to moderators of {{ currentHost }}.
<ng-container *ngIf="isRemoteVideo()"> It will be forwarded to origin instance {{ originHost }} too.</ng-container>
</div>
<form novalidate [formGroup]="form" (ngSubmit)="report()">
<div class="form-group">
<textarea i18n-placeholder placeholder="Reason..." formControlName="reason" [ngClass]="{ 'input-error': formErrors['reason'] }">
......
@import 'variables';
@import 'mixins';
.information {
margin-bottom: 20px;
}
textarea {
@include peertube-textarea(100%, 100px);
}
......@@ -33,6 +33,18 @@ export class VideoReportComponent extends FormReactive implements OnInit {
super()
}
get currentHost () {
return window.location.host
}
get originHost () {
if (this.isRemoteVideo()) {
return this.video.account.host
}
return ''
}
ngOnInit () {
this.buildForm({
reason: this.videoAbuseValidatorsService.VIDEO_ABUSE_REASON
......@@ -61,4 +73,8 @@ export class VideoReportComponent extends FormReactive implements OnInit {
err => this.notificationsService.error(this.i18n('Error'), err.message)
)
}
isRemoteVideo () {
return !this.video.isLocal
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment