From be1fc4bc50811df522cbfef299da6a7540589f65 Mon Sep 17 00:00:00 2001
From: Chocobozzz <me@florianbigard.com>
Date: Tue, 27 Mar 2018 15:46:36 +0200
Subject: Fix custom server configuration numbers

---
 client/src/app/about/about.component.html | 24 ++++++++++++++++++------
 client/src/app/about/about.component.scss |  2 +-
 client/src/app/about/about.component.ts   |  4 ++++
 3 files changed, 23 insertions(+), 7 deletions(-)

(limited to 'client/src')

diff --git a/client/src/app/about/about.component.html b/client/src/app/about/about.component.html
index bcb4ed2be..bad90d161 100644
--- a/client/src/app/about/about.component.html
+++ b/client/src/app/about/about.component.html
@@ -13,14 +13,26 @@
     <div class="section-title">Terms</div>
 
     <div [innerHTML]="termsHTML"></div>
+  </div>
+
+  <div class="signup">
+    <div class="section-title">Signup</div>
+
+    <div *ngIf="isSignupAllowed">
+      User registration is allowed and
+
+      <ng-template [ngIf]="userVideoQuota !== -1">
+        this instance provides a baseline quota of {{ userVideoQuota | bytes }} space for the videos of its users.
+      </ng-template>
+
+      <ng-template [ngIf]="userVideoQuota === -1">
+        this instance provides unlimited space for the videos of its users.
+      </ng-template>
+    </div>
 
-    <div *ngIf="userVideoQuota !== -1;else noQuota">
-      This instance provides a baseline quota of {{ userVideoQuota | bytes: 0 }} space for the videos of its users.
+    <div *ngIf="isSignupAllowed === false">
+      User registration is currently not allowed.
     </div>
-    
-    <ng-template #noQuota>
-      This instance provides unlimited space for the videos of its users.
-    </ng-template>
   </div>
 
   <div id="p2p-privacy">
diff --git a/client/src/app/about/about.component.scss b/client/src/app/about/about.component.scss
index 09e9c68cb..2a22b9528 100644
--- a/client/src/app/about/about.component.scss
+++ b/client/src/app/about/about.component.scss
@@ -7,6 +7,6 @@
   margin-bottom: 5px;
 }
 
-.description, .terms {
+.description, .terms, .signup {
   margin-bottom: 30px;
 }
diff --git a/client/src/app/about/about.component.ts b/client/src/app/about/about.component.ts
index 7edc013e1..2fd48f0d3 100644
--- a/client/src/app/about/about.component.ts
+++ b/client/src/app/about/about.component.ts
@@ -27,6 +27,10 @@ export class AboutComponent implements OnInit {
     return this.serverService.getConfig().user.videoQuota
   }
 
+  get isSignupAllowed () {
+    return this.serverService.getConfig().signup.allowed
+  }
+
   ngOnInit () {
     this.serverService.getAbout()
       .subscribe(
-- 
cgit v1.2.3