From d414207f07f47307947d86d5bc5c5fc0ae73be18 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 27 Mar 2018 16:18:25 +0200 Subject: Add root class if user is logged in --- client/src/app/about/about.component.html | 2 +- client/src/app/app.component.html | 2 +- client/src/app/app.component.ts | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'client') diff --git a/client/src/app/about/about.component.html b/client/src/app/about/about.component.html index bad90d161..bc6a8c6f3 100644 --- a/client/src/app/about/about.component.html +++ b/client/src/app/about/about.component.html @@ -22,7 +22,7 @@ User registration is allowed and - this instance provides a baseline quota of {{ userVideoQuota | bytes }} space for the videos of its users. + this instance provides a baseline quota of {{ userVideoQuota | bytes: 0 }} space for the videos of its users. diff --git a/client/src/app/app.component.html b/client/src/app/app.component.html index 06aca9bcd..a7128d4fa 100644 --- a/client/src/app/app.component.html +++ b/client/src/app/app.component.html @@ -1,6 +1,6 @@
-
+
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 0ea3c1389..18115ae75 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -57,7 +57,7 @@ export class AppComponent implements OnInit { this.authService.loadClientCredentials() - if (this.authService.isLoggedIn()) { + if (this.isUserLoggedIn()) { // The service will automatically redirect to the login page if the token is not valid anymore this.authService.refreshUserInformation() } @@ -104,6 +104,10 @@ export class AppComponent implements OnInit { }) } + isUserLoggedIn () { + return this.authService.isLoggedIn() + } + toggleMenu () { window.scrollTo(0, 0) this.isMenuDisplayed = !this.isMenuDisplayed -- cgit v1.2.3