diff options
Diffstat (limited to 'client/src/app/shared/shared-abuse-list')
-rw-r--r-- | client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts | 7 | ||||
-rw-r--r-- | client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts index 8781c16f5..32d3b0093 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts +++ b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts | |||
@@ -8,13 +8,14 @@ import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } | |||
8 | import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main' | 8 | import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main' |
9 | import { AbuseService, BlocklistService, VideoBlockService } from '@app/shared/shared-moderation' | 9 | import { AbuseService, BlocklistService, VideoBlockService } from '@app/shared/shared-moderation' |
10 | import { VideoCommentService } from '@app/shared/shared-video-comment' | 10 | import { VideoCommentService } from '@app/shared/shared-video-comment' |
11 | import { logger } from '@root-helpers/logger' | ||
11 | import { AbuseState, AdminAbuse } from '@shared/models' | 12 | import { AbuseState, AdminAbuse } from '@shared/models' |
12 | import { AdvancedInputFilter } from '../shared-forms' | 13 | import { AdvancedInputFilter } from '../shared-forms' |
13 | import { AbuseMessageModalComponent } from './abuse-message-modal.component' | 14 | import { AbuseMessageModalComponent } from './abuse-message-modal.component' |
14 | import { ModerationCommentModalComponent } from './moderation-comment-modal.component' | 15 | import { ModerationCommentModalComponent } from './moderation-comment-modal.component' |
15 | import { ProcessedAbuse } from './processed-abuse.model' | 16 | import { ProcessedAbuse } from './processed-abuse.model' |
16 | 17 | ||
17 | const logger = debug('peertube:moderation:AbuseListTableComponent') | 18 | const debugLogger = debug('peertube:moderation:AbuseListTableComponent') |
18 | 19 | ||
19 | @Component({ | 20 | @Component({ |
20 | selector: 'my-abuse-list-table', | 21 | selector: 'my-abuse-list-table', |
@@ -158,7 +159,7 @@ export class AbuseListTableComponent extends RestTable implements OnInit { | |||
158 | const abuse = this.abuses.find(a => a.id === event.abuseId) | 159 | const abuse = this.abuses.find(a => a.id === event.abuseId) |
159 | 160 | ||
160 | if (!abuse) { | 161 | if (!abuse) { |
161 | console.error('Cannot find abuse %d.', event.abuseId) | 162 | logger.error(`Cannot find abuse ${event.abuseId}`) |
162 | return | 163 | return |
163 | } | 164 | } |
164 | 165 | ||
@@ -177,7 +178,7 @@ export class AbuseListTableComponent extends RestTable implements OnInit { | |||
177 | } | 178 | } |
178 | 179 | ||
179 | protected reloadData () { | 180 | protected reloadData () { |
180 | logger('Loading data.') | 181 | debugLogger('Loading data.') |
181 | 182 | ||
182 | const options = { | 183 | const options = { |
183 | pagination: this.pagination, | 184 | pagination: this.pagination, |
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 6c8dc6d35..d24a5d58d 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 | |||
@@ -3,6 +3,7 @@ import { AuthService, HtmlRendererService, Notifier } from '@app/core' | |||
3 | import { 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 { logger } from '@root-helpers/logger' | ||
6 | import { AbuseMessage, UserAbuse } from '@shared/models' | 7 | import { AbuseMessage, UserAbuse } from '@shared/models' |
7 | import { ABUSE_MESSAGE_VALIDATOR } from '../form-validators/abuse-validators' | 8 | import { ABUSE_MESSAGE_VALIDATOR } from '../form-validators/abuse-validators' |
8 | import { AbuseService } from '../shared-moderation' | 9 | import { AbuseService } from '../shared-moderation' |
@@ -72,7 +73,7 @@ export class AbuseMessageModalComponent extends FormReactive implements OnInit { | |||
72 | 73 | ||
73 | error: err => { | 74 | error: err => { |
74 | this.sendingMessage = false | 75 | this.sendingMessage = false |
75 | console.error(err) | 76 | logger.error(err) |
76 | this.notifier.error('Sorry but you cannot send this message. Please retry later') | 77 | this.notifier.error('Sorry but you cannot send this message. Please retry later') |
77 | } | 78 | } |
78 | }) | 79 | }) |