diff options
Diffstat (limited to 'client/src/app/+admin/moderation/video-blacklist-list')
2 files changed, 9 insertions, 4 deletions
diff --git a/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.html b/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.html index 247f441c1..608dff2d8 100644 --- a/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.html +++ b/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.html | |||
@@ -41,7 +41,7 @@ | |||
41 | <tr> | 41 | <tr> |
42 | <td class="moderation-expanded" colspan="6"> | 42 | <td class="moderation-expanded" colspan="6"> |
43 | <span i18n class="moderation-expanded-label">Blacklist reason:</span> | 43 | <span i18n class="moderation-expanded-label">Blacklist reason:</span> |
44 | <span class="moderation-expanded-text" [innerHTML]="toHtml(videoBlacklist.reason)"></span> | 44 | <span class="moderation-expanded-text" [innerHTML]="videoBlacklist.reasonHtml"></span> |
45 | </td> | 45 | </td> |
46 | </tr> | 46 | </tr> |
47 | </ng-template> | 47 | </ng-template> |
diff --git a/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts b/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts index b27bbbfef..5443d816d 100644 --- a/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts +++ b/client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts | |||
@@ -15,7 +15,7 @@ import { MarkdownService } from '@app/shared/renderer' | |||
15 | styleUrls: [ '../moderation.component.scss' ] | 15 | styleUrls: [ '../moderation.component.scss' ] |
16 | }) | 16 | }) |
17 | export class VideoBlacklistListComponent extends RestTable implements OnInit { | 17 | export class VideoBlacklistListComponent extends RestTable implements OnInit { |
18 | blacklist: VideoBlacklist[] = [] | 18 | blacklist: (VideoBlacklist & { reasonHtml?: string })[] = [] |
19 | totalRecords = 0 | 19 | totalRecords = 0 |
20 | rowsPerPage = 10 | 20 | rowsPerPage = 10 |
21 | sort: SortMeta = { field: 'createdAt', order: 1 } | 21 | sort: SortMeta = { field: 'createdAt', order: 1 } |
@@ -79,9 +79,14 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit { | |||
79 | protected loadData () { | 79 | protected loadData () { |
80 | this.videoBlacklistService.listBlacklist(this.pagination, this.sort) | 80 | this.videoBlacklistService.listBlacklist(this.pagination, this.sort) |
81 | .subscribe( | 81 | .subscribe( |
82 | resultList => { | 82 | async resultList => { |
83 | this.blacklist = resultList.data | ||
84 | this.totalRecords = resultList.total | 83 | this.totalRecords = resultList.total |
84 | |||
85 | this.blacklist = resultList.data | ||
86 | |||
87 | for (const element of this.blacklist) { | ||
88 | Object.assign(element, { reasonHtml: await this.toHtml(element.reason) }) | ||
89 | } | ||
85 | }, | 90 | }, |
86 | 91 | ||
87 | err => this.notifier.error(err.message) | 92 | err => this.notifier.error(err.message) |