X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Badmin%2Foverview%2Fcomments%2Fvideo-comment-list.component.ts;h=c95d2ffeb12e2b932678782b90b87d7c12b0ee36;hb=2f061e065ab43cc0b73595b619639a92952aeeba;hp=25fe6513301329591ab2591bf9f4272012182847;hpb=5a51ecc2172282786dab47bd874026621554ba6d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+admin/overview/comments/video-comment-list.component.ts b/client/src/app/+admin/overview/comments/video-comment-list.component.ts index 25fe65133..c95d2ffeb 100644 --- a/client/src/app/+admin/overview/comments/video-comment-list.component.ts +++ b/client/src/app/+admin/overview/comments/video-comment-list.component.ts @@ -7,6 +7,7 @@ import { DropdownAction } from '@app/shared/shared-main' import { BulkService } from '@app/shared/shared-moderation' import { VideoCommentAdmin, VideoCommentService } from '@app/shared/shared-video-comment' import { FeedFormat, UserRight } from '@shared/models' +import { prepareIcu } from '@app/helpers' @Component({ selector: 'my-video-comment-list', @@ -53,6 +54,10 @@ export class VideoCommentListComponent extends RestTable implements OnInit { { value: 'local:false', label: $localize`Remote comments` + }, + { + value: 'localVideo:true', + label: $localize`Comments on local videos` } ] } @@ -110,14 +115,14 @@ export class VideoCommentListComponent extends RestTable implements OnInit { } toHtml (text: string) { - return this.markdownRenderer.textMarkdownToHTML(text, true, true) + return this.markdownRenderer.textMarkdownToHTML({ markdown: text, withHtml: true, withEmoji: true }) } isInSelectionMode () { return this.selectedComments.length !== 0 } - protected reloadData () { + reloadData () { this.videoCommentService.getAdminVideoComments({ pagination: this.pagination, sort: this.sort, @@ -145,7 +150,13 @@ export class VideoCommentListComponent extends RestTable implements OnInit { this.videoCommentService.deleteVideoComments(commentArgs) .subscribe({ next: () => { - this.notifier.success($localize`${commentArgs.length} comments deleted.`) + this.notifier.success( + prepareIcu($localize`{count, plural, =1 {1 comment deleted.} other {{count} comments deleted.}}`)( + { count: commentArgs.length }, + $localize`${commentArgs.length} comment(s) deleted.` + ) + ) + this.reloadData() },