mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
committed by
Denys Vuika
parent
a35c2f7c04
commit
f89fe8e50a
@@ -1,6 +1,6 @@
|
||||
<!-- Always shows a header, even in smaller screens. -->
|
||||
<div mdl class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
|
||||
<header class="mdl-layout__header main_header_adf" [ngClass]="{hide: isLoginPage()}">
|
||||
<header class="mdl-layout__header main_header_adf" [ngClass]="{hide: isAPageWithHeaderBar()}">
|
||||
<div class="mdl-button-padding mdl-layout__header-row">
|
||||
|
||||
<!-- User Info -->
|
||||
|
@@ -64,12 +64,12 @@ export class AppComponent {
|
||||
}
|
||||
|
||||
redirectToLoginPageIfNotLoggedIn(): void {
|
||||
if (!this.isLoginPage() && !this.authService.isLoggedIn()) {
|
||||
if (!this.authService.isLoggedIn()) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
}
|
||||
|
||||
isLoginPage(): boolean {
|
||||
isAPageWithHeaderBar(): boolean {
|
||||
return location.pathname === '/login' || location.pathname === '/settings';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user