1
0
Fork 0
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:
Chocobozzz 2021-06-04 13:31:41 +02:00
parent 8e08d415f9
commit 2989628b79
No known key found for this signature in database
GPG key ID: 583A612D890159BE
47 changed files with 265 additions and 351 deletions

View file

@ -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 () {