Move user registration info in features table
authorChocobozzz <me@florianbigard.com>
Thu, 21 Feb 2019 14:00:26 +0000 (15:00 +0100)
committerChocobozzz <me@florianbigard.com>
Thu, 21 Feb 2019 14:00:26 +0000 (15:00 +0100)
client/src/app/+about/about-instance/about-instance.component.html
client/src/app/+about/about-instance/about-instance.component.ts
client/src/app/shared/instance/instance-features-table.component.html
client/src/app/shared/instance/instance-features-table.component.ts

index 8c700752e8ca35c4c01be0309d42f10039f955cf..83376b6f67183cd3b5f7a00414bad1bc6323f843 100644 (file)
 
       <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">
index ec572ff806f5fff7078c57d7d68541700af6b3b1..c9eab44ab6efcf7e0170b54a446660a55d8a2df8 100644 (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
   }
index dc8db8cc1bedaa1565d1572bbc38336f1b13f4ae..90046f4094c59d4c1a97d2764db28c484a560d3b 100644 (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>
 
         </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>
\ No newline at end of file
+</div>
index da8da07023f391663fa44d60cddcdd32bfee9021..aaf0a696014da22fa458c6c01f93feb8191772d8 100644 (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) {