diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-17 11:47:04 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-08-17 15:12:55 +0200 |
commit | 7ed1edbbe4ffbef28093e4f5630751cb652814e4 (patch) | |
tree | 831862165dbfce593447a517c2294a7a4c28d840 /client/src/app/shared/shared-abuse-list | |
parent | 1a95f0b9627f8016767a5a386620cbc3335d5f93 (diff) | |
download | PeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.tar.gz PeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.tar.zst PeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.zip |
We don't need services anymore for validators
Diffstat (limited to 'client/src/app/shared/shared-abuse-list')
-rw-r--r-- | client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts | 6 | ||||
-rw-r--r-- | client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts b/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts index 0c3c8ff48..9abb4c094 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts +++ b/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts | |||
@@ -1,9 +1,10 @@ | |||
1 | import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' | 1 | import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' |
2 | import { AuthService, HtmlRendererService, Notifier } from '@app/core' | 2 | import { AuthService, HtmlRendererService, Notifier } from '@app/core' |
3 | import { AbuseValidatorsService, FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 3 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' |
4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
5 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 5 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
6 | import { AbuseMessage, UserAbuse } from '@shared/models' | 6 | import { AbuseMessage, UserAbuse } from '@shared/models' |
7 | import { ABUSE_MESSAGE_VALIDATOR } from '../form-validators/abuse-validators' | ||
7 | import { AbuseService } from '../shared-moderation' | 8 | import { AbuseService } from '../shared-moderation' |
8 | 9 | ||
9 | @Component({ | 10 | @Component({ |
@@ -28,7 +29,6 @@ export class AbuseMessageModalComponent extends FormReactive implements OnInit { | |||
28 | 29 | ||
29 | constructor ( | 30 | constructor ( |
30 | protected formValidatorService: FormValidatorService, | 31 | protected formValidatorService: FormValidatorService, |
31 | private abuseValidatorsService: AbuseValidatorsService, | ||
32 | private modalService: NgbModal, | 32 | private modalService: NgbModal, |
33 | private htmlRenderer: HtmlRendererService, | 33 | private htmlRenderer: HtmlRendererService, |
34 | private auth: AuthService, | 34 | private auth: AuthService, |
@@ -40,7 +40,7 @@ export class AbuseMessageModalComponent extends FormReactive implements OnInit { | |||
40 | 40 | ||
41 | ngOnInit () { | 41 | ngOnInit () { |
42 | this.buildForm({ | 42 | this.buildForm({ |
43 | message: this.abuseValidatorsService.ABUSE_MESSAGE | 43 | message: ABUSE_MESSAGE_VALIDATOR |
44 | }) | 44 | }) |
45 | } | 45 | } |
46 | 46 | ||
diff --git a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts index fad7f888d..876aeea8a 100644 --- a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts +++ b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts | |||
@@ -1,10 +1,11 @@ | |||
1 | import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' | 1 | import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' |
2 | import { Notifier } from '@app/core' | 2 | import { Notifier } from '@app/core' |
3 | import { AbuseValidatorsService, FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 3 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' |
4 | import { AbuseService } from '@app/shared/shared-moderation' | 4 | import { AbuseService } from '@app/shared/shared-moderation' |
5 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 5 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
6 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 6 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
7 | import { AdminAbuse } from '@shared/models' | 7 | import { AdminAbuse } from '@shared/models' |
8 | import { ABUSE_MODERATION_COMMENT_VALIDATOR } from '../form-validators/abuse-validators' | ||
8 | 9 | ||
9 | @Component({ | 10 | @Component({ |
10 | selector: 'my-moderation-comment-modal', | 11 | selector: 'my-moderation-comment-modal', |
@@ -22,15 +23,14 @@ export class ModerationCommentModalComponent extends FormReactive implements OnI | |||
22 | protected formValidatorService: FormValidatorService, | 23 | protected formValidatorService: FormValidatorService, |
23 | private modalService: NgbModal, | 24 | private modalService: NgbModal, |
24 | private notifier: Notifier, | 25 | private notifier: Notifier, |
25 | private abuseService: AbuseService, | 26 | private abuseService: AbuseService |
26 | private abuseValidatorsService: AbuseValidatorsService | ||
27 | ) { | 27 | ) { |
28 | super() | 28 | super() |
29 | } | 29 | } |
30 | 30 | ||
31 | ngOnInit () { | 31 | ngOnInit () { |
32 | this.buildForm({ | 32 | this.buildForm({ |
33 | moderationComment: this.abuseValidatorsService.ABUSE_MODERATION_COMMENT | 33 | moderationComment: ABUSE_MODERATION_COMMENT_VALIDATOR |
34 | }) | 34 | }) |
35 | } | 35 | } |
36 | 36 | ||