Move user registration info in features table

pull/1697/head
Chocobozzz 2019-02-21 15:00:26 +01:00
parent 9b39106d57
commit c0e04e4641
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
4 changed files with 13 additions and 38 deletions

View File

@ -21,26 +21,6 @@
<div [innerHTML]="termsHTML"></div>
</div>
<div class="signup">
<div i18n class="section-title">Signup</div>
<div *ngIf="isSignupAllowed">
<ng-container i18n>User registration is allowed and</ng-container>
<ng-container i18n *ngIf="userVideoQuota !== -1">
this instance provides a baseline quota of {{ userVideoQuota | bytes: 0 }} space for the videos of its users.
</ng-container>
<ng-container i18n *ngIf="userVideoQuota === -1">
this instance provides unlimited space for the videos of its users.
</ng-container>
</div>
<div i18n *ngIf="isSignupAllowed === false">
User registration is currently not allowed.
</div>
</div>
</div>
<div class="col-md-12 col-xl-6">

View File

@ -29,14 +29,6 @@ export class AboutInstanceComponent implements OnInit {
return this.serverService.getConfig().instance.name
}
get userVideoQuota () {
return this.serverService.getConfig().user.videoQuota
}
get isSignupAllowed () {
return this.serverService.getConfig().signup.allowed
}
get isContactFormEnabled () {
return this.serverService.getConfig().email.enabled && this.serverService.getConfig().contactForm.enabled
}

View File

@ -1,6 +1,14 @@
<div class="feature-table">
<table class="table">
<tr *ngFor="let feature of features">
<td class="label">{{ feature.label }}</td>
<td>
<span *ngIf="feature.value === true" class="glyphicon glyphicon-ok"></span>
<span *ngIf="feature.value === false" class="glyphicon glyphicon-remove"></span>
</td>
</tr>
<tr>
<td i18n class="label">Video quota</td>
@ -16,13 +24,5 @@
</ng-container>
</td>
</tr>
<tr *ngFor="let feature of features">
<td class="label">{{ feature.label }}</td>
<td>
<span *ngIf="feature.value === true" class="glyphicon glyphicon-ok"></span>
<span *ngIf="feature.value === false" class="glyphicon glyphicon-remove"></span>
</td>
</tr>
</table>
</div>

View File

@ -37,6 +37,10 @@ export class InstanceFeaturesTableComponent implements OnInit {
const config = this.serverService.getConfig()
this.features = [
{
label: this.i18n('User registration allowed'),
value: config.signup.allowed
},
{
label: this.i18n('Transcode your videos in multiple resolutions'),
value: config.transcoding.enabledResolutions.length !== 0
@ -50,7 +54,6 @@ export class InstanceFeaturesTableComponent implements OnInit {
value: config.import.videos.torrent.enabled
}
]
}
private getApproximateTime (seconds: number) {