diff options
author | Chocobozzz <me@florianbigard.com> | 2019-12-18 15:31:54 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-12-18 15:40:59 +0100 |
commit | ba430d7516bc5b1324b60571ba7594460969b7fb (patch) | |
tree | df5c6952c82f49a94c0a884bbc97d4a0cbd9f867 /client/src/app/+admin/moderation/video-blacklist-list/video-blacklist-list.component.ts | |
parent | 5dfb7c1dec8222b0bbccac5b56ad46da1438747e (diff) | |
download | PeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.tar.gz PeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.tar.zst PeerTube-ba430d7516bc5b1324b60571ba7594460969b7fb.zip |
Lazy load static objects
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 | 19 |
1 files changed, 11 insertions, 8 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 f4bce7c48..5876f658b 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 | |||
@@ -33,11 +33,18 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit { | |||
33 | private i18n: I18n | 33 | private i18n: I18n |
34 | ) { | 34 | ) { |
35 | super() | 35 | super() |
36 | } | ||
36 | 37 | ||
37 | // don't filter if auto-blacklist not enabled as this will be only list | 38 | ngOnInit () { |
38 | if (this.serverService.getConfig().autoBlacklist.videos.ofUsers.enabled) { | 39 | this.serverService.getConfig() |
39 | this.listBlacklistTypeFilter = VideoBlacklistType.MANUAL | 40 | .subscribe(config => { |
40 | } | 41 | // don't filter if auto-blacklist not enabled as this will be only list |
42 | if (config.autoBlacklist.videos.ofUsers.enabled) { | ||
43 | this.listBlacklistTypeFilter = VideoBlacklistType.MANUAL | ||
44 | } | ||
45 | }) | ||
46 | |||
47 | this.initialize() | ||
41 | 48 | ||
42 | this.videoBlacklistActions = [ | 49 | this.videoBlacklistActions = [ |
43 | { | 50 | { |
@@ -47,10 +54,6 @@ export class VideoBlacklistListComponent extends RestTable implements OnInit { | |||
47 | ] | 54 | ] |
48 | } | 55 | } |
49 | 56 | ||
50 | ngOnInit () { | ||
51 | this.initialize() | ||
52 | } | ||
53 | |||
54 | getVideoUrl (videoBlacklist: VideoBlacklist) { | 57 | getVideoUrl (videoBlacklist: VideoBlacklist) { |
55 | return Video.buildClientUrl(videoBlacklist.video.uuid) | 58 | return Video.buildClientUrl(videoBlacklist.video.uuid) |
56 | } | 59 | } |