aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts')
-rw-r--r--client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts13
1 files changed, 6 insertions, 7 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 32d3b0093..569a37b17 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
@@ -2,7 +2,6 @@ import * as debug from 'debug'
2import truncate from 'lodash-es/truncate' 2import truncate from 'lodash-es/truncate'
3import { SortMeta } from 'primeng/api' 3import { SortMeta } from 'primeng/api'
4import { Component, Input, OnInit, ViewChild } from '@angular/core' 4import { Component, Input, OnInit, ViewChild } from '@angular/core'
5import { DomSanitizer } from '@angular/platform-browser'
6import { ActivatedRoute, Router } from '@angular/router' 5import { ActivatedRoute, Router } from '@angular/router'
7import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } from '@app/core' 6import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable } from '@app/core'
8import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main' 7import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main'
@@ -73,8 +72,7 @@ export class AbuseListTableComponent extends RestTable implements OnInit {
73 private videoService: VideoService, 72 private videoService: VideoService,
74 private videoBlocklistService: VideoBlockService, 73 private videoBlocklistService: VideoBlockService,
75 private confirmService: ConfirmService, 74 private confirmService: ConfirmService,
76 private markdownRenderer: MarkdownService, 75 private markdownRenderer: MarkdownService
77 private sanitizer: DomSanitizer
78 ) { 76 ) {
79 super() 77 super()
80 } 78 }
@@ -216,8 +214,8 @@ export class AbuseListTableComponent extends RestTable implements OnInit {
216 abuse.truncatedCommentHtml = abuse.commentHtml = $localize`Deleted comment` 214 abuse.truncatedCommentHtml = abuse.commentHtml = $localize`Deleted comment`
217 } else { 215 } else {
218 const truncated = truncate(abuse.comment.text, { length: 100 }) 216 const truncated = truncate(abuse.comment.text, { length: 100 })
219 abuse.truncatedCommentHtml = await this.markdownRenderer.textMarkdownToHTML(truncated, true) 217 abuse.truncatedCommentHtml = await this.markdownRenderer.textMarkdownToHTML({ markdown: truncated, withHtml: true })
220 abuse.commentHtml = await this.markdownRenderer.textMarkdownToHTML(abuse.comment.text, true) 218 abuse.commentHtml = await this.markdownRenderer.textMarkdownToHTML({ markdown: abuse.comment.text, withHtml: true })
221 } 219 }
222 } 220 }
223 221
@@ -274,7 +272,8 @@ export class AbuseListTableComponent extends RestTable implements OnInit {
274 }, 272 },
275 { 273 {
276 label: $localize`Delete report`, 274 label: $localize`Delete report`,
277 handler: abuse => this.isAdminView() && this.removeAbuse(abuse) 275 handler: abuse => this.removeAbuse(abuse),
276 isDisplayed: () => this.isAdminView()
278 } 277 }
279 ] 278 ]
280 } 279 }
@@ -452,6 +451,6 @@ export class AbuseListTableComponent extends RestTable implements OnInit {
452 } 451 }
453 452
454 private toHtml (text: string) { 453 private toHtml (text: string) {
455 return this.markdownRenderer.textMarkdownToHTML(text) 454 return this.markdownRenderer.textMarkdownToHTML({ markdown: text })
456 } 455 }
457} 456}