aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-abuse-list
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-15 15:30:14 +0200
committerChocobozzz <me@florianbigard.com>2022-07-18 11:37:18 +0200
commit42b40636991b97fe818007fab19091764fc5db73 (patch)
treedb431787c06ce898d22e91ff771f795219274fc6 /client/src/app/shared/shared-abuse-list
parent654d4ede7fa4d0faa71e49bcfab6b65a686397b2 (diff)
downloadPeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.gz
PeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.zst
PeerTube-42b40636991b97fe818007fab19091764fc5db73.zip
Add ability for client to create server logs
Diffstat (limited to 'client/src/app/shared/shared-abuse-list')
-rw-r--r--client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts7
-rw-r--r--client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts3
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 }
8import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main' 8import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main'
9import { AbuseService, BlocklistService, VideoBlockService } from '@app/shared/shared-moderation' 9import { AbuseService, BlocklistService, VideoBlockService } from '@app/shared/shared-moderation'
10import { VideoCommentService } from '@app/shared/shared-video-comment' 10import { VideoCommentService } from '@app/shared/shared-video-comment'
11import { logger } from '@root-helpers/logger'
11import { AbuseState, AdminAbuse } from '@shared/models' 12import { AbuseState, AdminAbuse } from '@shared/models'
12import { AdvancedInputFilter } from '../shared-forms' 13import { AdvancedInputFilter } from '../shared-forms'
13import { AbuseMessageModalComponent } from './abuse-message-modal.component' 14import { AbuseMessageModalComponent } from './abuse-message-modal.component'
14import { ModerationCommentModalComponent } from './moderation-comment-modal.component' 15import { ModerationCommentModalComponent } from './moderation-comment-modal.component'
15import { ProcessedAbuse } from './processed-abuse.model' 16import { ProcessedAbuse } from './processed-abuse.model'
16 17
17const logger = debug('peertube:moderation:AbuseListTableComponent') 18const 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'
3import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' 3import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
4import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 4import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
5import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' 5import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
6import { logger } from '@root-helpers/logger'
6import { AbuseMessage, UserAbuse } from '@shared/models' 7import { AbuseMessage, UserAbuse } from '@shared/models'
7import { ABUSE_MESSAGE_VALIDATOR } from '../form-validators/abuse-validators' 8import { ABUSE_MESSAGE_VALIDATOR } from '../form-validators/abuse-validators'
8import { AbuseService } from '../shared-moderation' 9import { 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 })