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/moderation.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/moderation.component.ts')
-rw-r--r-- | client/src/app/+admin/moderation/moderation.component.ts | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/client/src/app/+admin/moderation/moderation.component.ts b/client/src/app/+admin/moderation/moderation.component.ts index 47154af3f..7744deb06 100644 --- a/client/src/app/+admin/moderation/moderation.component.ts +++ b/client/src/app/+admin/moderation/moderation.component.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Component } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { UserRight } from '../../../../../shared' | 2 | import { UserRight } from '../../../../../shared' |
3 | import { AuthService, ServerService } from '@app/core' | 3 | import { AuthService, ServerService } from '@app/core' |
4 | 4 | ||
@@ -6,14 +6,18 @@ import { AuthService, ServerService } from '@app/core' | |||
6 | templateUrl: './moderation.component.html', | 6 | templateUrl: './moderation.component.html', |
7 | styleUrls: [ './moderation.component.scss' ] | 7 | styleUrls: [ './moderation.component.scss' ] |
8 | }) | 8 | }) |
9 | export class ModerationComponent { | 9 | export class ModerationComponent implements OnInit { |
10 | autoBlacklistVideosEnabled: boolean | 10 | autoBlacklistVideosEnabled = false |
11 | 11 | ||
12 | constructor ( | 12 | constructor ( |
13 | private auth: AuthService, | 13 | private auth: AuthService, |
14 | private serverService: ServerService | 14 | private serverService: ServerService |
15 | ) { | 15 | ) { } |
16 | this.autoBlacklistVideosEnabled = this.serverService.getConfig().autoBlacklist.videos.ofUsers.enabled | 16 | |
17 | ngOnInit (): void { | ||
18 | this.serverService.getConfig() | ||
19 | .subscribe(config => this.autoBlacklistVideosEnabled = config.autoBlacklist.videos.ofUsers.enabled) | ||
20 | |||
17 | } | 21 | } |
18 | 22 | ||
19 | hasVideoAbusesRight () { | 23 | hasVideoAbusesRight () { |