mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 09:49:20 +02:00
Use HTML config when possible
This commit is contained in:
parent
8e08d415f9
commit
2989628b79
47 changed files with 265 additions and 351 deletions
|
@ -1,7 +1,7 @@
|
|||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core'
|
||||
import { AuthService, ConfirmService, Notifier, ServerService, UserService } from '@app/core'
|
||||
import { Account, DropdownAction } from '@app/shared/shared-main'
|
||||
import { BulkRemoveCommentsOfBody, ServerConfig, User, UserRight } from '@shared/models'
|
||||
import { BulkRemoveCommentsOfBody, User, UserRight } from '@shared/models'
|
||||
import { BlocklistService } from './blocklist.service'
|
||||
import { BulkService } from './bulk.service'
|
||||
import { UserBanModalComponent } from './user-ban-modal.component'
|
||||
|
@ -28,7 +28,7 @@ export class UserModerationDropdownComponent implements OnInit, OnChanges {
|
|||
|
||||
userActions: DropdownAction<{ user: User, account: Account }>[][] = []
|
||||
|
||||
private serverConfig: ServerConfig
|
||||
requiresEmailVerification = false
|
||||
|
||||
constructor (
|
||||
private authService: AuthService,
|
||||
|
@ -40,14 +40,9 @@ export class UserModerationDropdownComponent implements OnInit, OnChanges {
|
|||
private bulkService: BulkService
|
||||
) { }
|
||||
|
||||
get requiresEmailVerification () {
|
||||
return this.serverConfig.signup.requiresEmailVerification
|
||||
}
|
||||
|
||||
ngOnInit (): void {
|
||||
this.serverConfig = this.serverService.getTmpConfig()
|
||||
ngOnInit () {
|
||||
this.serverService.getConfig()
|
||||
.subscribe(config => this.serverConfig = config)
|
||||
.subscribe(config => this.requiresEmailVerification = config.signup.requiresEmailVerification)
|
||||
}
|
||||
|
||||
ngOnChanges () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue