X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Badmin%2Fmoderation%2Fvideo-abuse-list%2Fmoderation-comment-modal.component.ts;h=29f90194baeb9744fdec1c7bb1372a20a97633bc;hb=24e7916c6897bbb38e057cdf1a102286006be964;hp=bebcb420710ceeebec009c350baabe758fe1887e;hpb=f8b2c1b4f509c037b9650cca2c5befd21f056df3;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.ts b/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.ts index bebcb4207..29f90194b 100644 --- a/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.ts +++ b/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.ts @@ -13,7 +13,7 @@ import { VideoAbuse } from '../../../../../../shared/models/videos' styleUrls: [ './moderation-comment-modal.component.scss' ] }) export class ModerationCommentModalComponent extends FormReactive implements OnInit { - @ViewChild('modal') modal: NgbModal + @ViewChild('modal', { static: true }) modal: NgbModal @Output() commentUpdated = new EventEmitter() private abuseToComment: VideoAbuse @@ -38,14 +38,14 @@ export class ModerationCommentModalComponent extends FormReactive implements OnI openModal (abuseToComment: VideoAbuse) { this.abuseToComment = abuseToComment - this.openedModal = this.modalService.open(this.modal) + this.openedModal = this.modalService.open(this.modal, { centered: true }) this.form.patchValue({ moderationComment: this.abuseToComment.moderationComment }) } - hideModerationCommentModal () { + hide () { this.abuseToComment = undefined this.openedModal.close() this.form.reset() @@ -60,7 +60,7 @@ export class ModerationCommentModalComponent extends FormReactive implements OnI this.notifier.success(this.i18n('Comment updated.')) this.commentUpdated.emit(moderationComment) - this.hideModerationCommentModal() + this.hide() }, err => this.notifier.error(err.message)