Merge pull request #974 from Alfresco/dev-mromano-973

hide header bar for login page
This commit is contained in:
Eugenio Romano 2016-11-02 09:36:52 +00:00 committed by GitHub
commit ed97a737bf
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
<!-- Always shows a header, even in smaller screens. --> <!-- Always shows a header, even in smaller screens. -->
<div mdl class="mdl-layout mdl-js-layout mdl-layout--fixed-header"> <div mdl class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<div *ngIf="isLoggedIn()"> <div *ngIf="!isLoginPage()">
<header class="mdl-layout__header"> <header class="mdl-layout__header">
<div class="mdl-layout__header-row"> <div class="mdl-layout__header-row">
<!-- Title --> <!-- Title -->

View File

@ -54,6 +54,10 @@ export class AppComponent {
return this.auth.isLoggedIn(); return this.auth.isLoggedIn();
} }
isLoginPage(): boolean {
return location.pathname === '/login' || location.pathname === '/';
}
onLogout(event) { onLogout(event) {
event.preventDefault(); event.preventDefault();
this.auth.logout() this.auth.logout()