diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-15 15:52:18 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-15 15:52:18 +0100 |
commit | 41d713446c2152d47943ddb0c841a9e36ca5a9db (patch) | |
tree | 7b22f6f7ea5652107ef503470d2455c4bb087799 /client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts | |
parent | 17036be5bc2f14dc4e66053087e39887599df4de (diff) | |
download | PeerTube-41d713446c2152d47943ddb0c841a9e36ca5a9db.tar.gz PeerTube-41d713446c2152d47943ddb0c841a9e36ca5a9db.tar.zst PeerTube-41d713446c2152d47943ddb0c841a9e36ca5a9db.zip |
Lazy import some modules
Diffstat (limited to 'client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts')
-rw-r--r-- | client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts | 11 |
1 files changed, 8 insertions, 3 deletions
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) |