diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-04 13:31:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-04 15:45:44 +0200 |
commit | 2989628b7913383b39ac34c7db8666a21f8e5037 (patch) | |
tree | ac7759177c04e524e7845143fd685aefb49e810e /client/src/app/+admin/moderation | |
parent | 8e08d415f9473b6b72fef698729453e726da16e7 (diff) | |
download | PeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.tar.gz PeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.tar.zst PeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.zip |
Use HTML config when possible
Diffstat (limited to 'client/src/app/+admin/moderation')
-rw-r--r-- | client/src/app/+admin/moderation/moderation.component.ts | 5 | ||||
-rw-r--r-- | client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts | 13 |
2 files changed, 9 insertions, 9 deletions
diff --git a/client/src/app/+admin/moderation/moderation.component.ts b/client/src/app/+admin/moderation/moderation.component.ts index 85665ea4f..44dd11c47 100644 --- a/client/src/app/+admin/moderation/moderation.component.ts +++ b/client/src/app/+admin/moderation/moderation.component.ts | |||
@@ -13,7 +13,8 @@ export class ModerationComponent implements OnInit { | |||
13 | ) { } | 13 | ) { } |
14 | 14 | ||
15 | ngOnInit (): void { | 15 | ngOnInit (): void { |
16 | this.serverService.getConfig() | 16 | const serverConfig = this.serverService.getHTMLConfig() |
17 | .subscribe(config => this.autoBlockVideosEnabled = config.autoBlacklist.videos.ofUsers.enabled) | 17 | |
18 | this.autoBlockVideosEnabled = serverConfig.autoBlacklist.videos.ofUsers.enabled | ||
18 | } | 19 | } |
19 | } | 20 | } |
diff --git a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts index 498d8321a..63143d0f9 100644 --- a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts +++ b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts | |||
@@ -107,13 +107,12 @@ export class VideoBlockListComponent extends RestTable implements OnInit { | |||
107 | } | 107 | } |
108 | 108 | ||
109 | ngOnInit () { | 109 | ngOnInit () { |
110 | this.serverService.getConfig() | 110 | const serverConfig = this.serverService.getHTMLConfig() |
111 | .subscribe(config => { | 111 | |
112 | // don't filter if auto-blacklist is not enabled as this will be the only list | 112 | // Don't filter if auto-blacklist is not enabled as this will be the only list |
113 | if (config.autoBlacklist.videos.ofUsers.enabled) { | 113 | if (serverConfig.autoBlacklist.videos.ofUsers.enabled) { |
114 | this.blocklistTypeFilter = VideoBlacklistType.MANUAL | 114 | this.blocklistTypeFilter = VideoBlacklistType.MANUAL |
115 | } | 115 | } |
116 | }) | ||
117 | 116 | ||
118 | this.initialize() | 117 | this.initialize() |
119 | } | 118 | } |