aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-moderation
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-04 13:31:41 +0200
committerChocobozzz <me@florianbigard.com>2021-06-04 15:45:44 +0200
commit2989628b7913383b39ac34c7db8666a21f8e5037 (patch)
treeac7759177c04e524e7845143fd685aefb49e810e /client/src/app/shared/shared-moderation
parent8e08d415f9473b6b72fef698729453e726da16e7 (diff)
downloadPeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.tar.gz
PeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.tar.zst
PeerTube-2989628b7913383b39ac34c7db8666a21f8e5037.zip
Use HTML config when possible
Diffstat (limited to 'client/src/app/shared/shared-moderation')
-rw-r--r--client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts13
1 files changed, 4 insertions, 9 deletions
diff --git a/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts b/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts
index f510a82f9..8c5a48d42 100644
--- a/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts
+++ b/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts
@@ -1,7 +1,7 @@
1import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core' 1import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core'
2import { AuthService, ConfirmService, Notifier, ServerService, UserService } from '@app/core' 2import { AuthService, ConfirmService, Notifier, ServerService, UserService } from '@app/core'
3import { Account, DropdownAction } from '@app/shared/shared-main' 3import { Account, DropdownAction } from '@app/shared/shared-main'
4import { BulkRemoveCommentsOfBody, ServerConfig, User, UserRight } from '@shared/models' 4import { BulkRemoveCommentsOfBody, User, UserRight } from '@shared/models'
5import { BlocklistService } from './blocklist.service' 5import { BlocklistService } from './blocklist.service'
6import { BulkService } from './bulk.service' 6import { BulkService } from './bulk.service'
7import { UserBanModalComponent } from './user-ban-modal.component' 7import { UserBanModalComponent } from './user-ban-modal.component'
@@ -28,7 +28,7 @@ export class UserModerationDropdownComponent implements OnInit, OnChanges {
28 28
29 userActions: DropdownAction<{ user: User, account: Account }>[][] = [] 29 userActions: DropdownAction<{ user: User, account: Account }>[][] = []
30 30
31 private serverConfig: ServerConfig 31 requiresEmailVerification = false
32 32
33 constructor ( 33 constructor (
34 private authService: AuthService, 34 private authService: AuthService,
@@ -40,14 +40,9 @@ export class UserModerationDropdownComponent implements OnInit, OnChanges {
40 private bulkService: BulkService 40 private bulkService: BulkService
41 ) { } 41 ) { }
42 42
43 get requiresEmailVerification () { 43 ngOnInit () {
44 return this.serverConfig.signup.requiresEmailVerification
45 }
46
47 ngOnInit (): void {
48 this.serverConfig = this.serverService.getTmpConfig()
49 this.serverService.getConfig() 44 this.serverService.getConfig()
50 .subscribe(config => this.serverConfig = config) 45 .subscribe(config => this.requiresEmailVerification = config.signup.requiresEmailVerification)
51 } 46 }
52 47
53 ngOnChanges () { 48 ngOnChanges () {