mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Add user registration policy info
This commit is contained in:
parent
4115f20084
commit
ff71e06ad1
3 changed files with 17 additions and 4 deletions
|
@ -18,10 +18,9 @@
|
|||
</tr>
|
||||
|
||||
<tr>
|
||||
<th i18n class="label" scope="row">User registration allowed</th>
|
||||
<td>
|
||||
<my-feature-boolean [value]="serverConfig.signup.allowed"></my-feature-boolean>
|
||||
</td>
|
||||
<th i18n class="label" scope="row">User registration</th>
|
||||
|
||||
<td class="value">{{ buildRegistrationLabel() }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
|
|
@ -56,6 +56,15 @@ export class InstanceFeaturesTableComponent implements OnInit {
|
|||
if (policy === 'display') return $localize`Displayed`
|
||||
}
|
||||
|
||||
buildRegistrationLabel () {
|
||||
const config = this.serverConfig.signup
|
||||
|
||||
if (config.allowed !== true) return $localize`Disabled`
|
||||
if (config.requiresApproval === true) return $localize`Requires approval by moderators`
|
||||
|
||||
return $localize`Enabled`
|
||||
}
|
||||
|
||||
getServerVersionAndCommit () {
|
||||
return this.serverService.getServerVersionAndCommit()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue