mirror of https://github.com/Chocobozzz/PeerTube
Add root class if user is logged in
parent
320f8d7e01
commit
d414207f07
|
@ -22,7 +22,7 @@
|
||||||
User registration is allowed and
|
User registration is allowed and
|
||||||
|
|
||||||
<ng-template [ngIf]="userVideoQuota !== -1">
|
<ng-template [ngIf]="userVideoQuota !== -1">
|
||||||
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.
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template [ngIf]="userVideoQuota === -1">
|
<ng-template [ngIf]="userVideoQuota === -1">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div *ngIf="customCSS" [innerHTML]="customCSS"></div>
|
<div *ngIf="customCSS" [innerHTML]="customCSS"></div>
|
||||||
|
|
||||||
<div>
|
<div [ngClass]="{ 'user-logged-in': isUserLoggedIn(), 'user-not-logged-in': !isUserLoggedIn() }">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
|
|
||||||
<div class="top-left-block" [ngClass]="{ 'border-bottom': isMenuDisplayed === false }">
|
<div class="top-left-block" [ngClass]="{ 'border-bottom': isMenuDisplayed === false }">
|
||||||
|
|
|
@ -57,7 +57,7 @@ export class AppComponent implements OnInit {
|
||||||
|
|
||||||
this.authService.loadClientCredentials()
|
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
|
// The service will automatically redirect to the login page if the token is not valid anymore
|
||||||
this.authService.refreshUserInformation()
|
this.authService.refreshUserInformation()
|
||||||
}
|
}
|
||||||
|
@ -104,6 +104,10 @@ export class AppComponent implements OnInit {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isUserLoggedIn () {
|
||||||
|
return this.authService.isLoggedIn()
|
||||||
|
}
|
||||||
|
|
||||||
toggleMenu () {
|
toggleMenu () {
|
||||||
window.scrollTo(0, 0)
|
window.scrollTo(0, 0)
|
||||||
this.isMenuDisplayed = !this.isMenuDisplayed
|
this.isMenuDisplayed = !this.isMenuDisplayed
|
||||||
|
|
Loading…
Reference in New Issue