templateUrl: './video-comment-list.component.html',
styleUrls: [ '../../../shared/shared-moderation/moderation.scss', './video-comment-list.component.scss' ]
})
-export class VideoCommentListComponent extends RestTable implements OnInit {
+export class VideoCommentListComponent extends RestTable <VideoCommentAdmin> implements OnInit {
comments: VideoCommentAdmin[]
totalRecords = 0
sort: SortMeta = { field: 'createdAt', order: -1 }
}
]
- selectedComments: VideoCommentAdmin[] = []
- bulkCommentActions: DropdownAction<VideoCommentAdmin[]>[] = []
+ bulkActions: DropdownAction<VideoCommentAdmin[]>[] = []
inputFilters: AdvancedInputFilter[] = [
{
{
value: 'local:false',
label: $localize`Remote comments`
+ },
+ {
+ value: 'localVideo:true',
+ label: $localize`Comments on local videos`
}
]
}
ngOnInit () {
this.initialize()
- this.bulkCommentActions = [
+ this.bulkActions = [
{
label: $localize`Delete`,
handler: comments => this.removeComments(comments),
}
toHtml (text: string) {
- return this.markdownRenderer.textMarkdownToHTML(text, true, true)
- }
-
- isInSelectionMode () {
- return this.selectedComments.length !== 0
+ return this.markdownRenderer.textMarkdownToHTML({ markdown: text, withHtml: true, withEmoji: true })
}
reloadData () {
error: err => this.notifier.error(err.message),
- complete: () => this.selectedComments = []
+ complete: () => this.selectedRows = []
})
}