-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Fabio Giaffaglione
committed
Dec 4, 2016
1 parent
46ac9a4
commit 4c1dbf2
Showing
11 changed files
with
268 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +0,0 @@ | ||
md-sidenav-layout.m2app-dark { | ||
background: black; | ||
} | ||
|
||
.app-content { | ||
padding: 20px; | ||
} | ||
|
||
.app-content md-card { | ||
margin: 20px; | ||
} | ||
|
||
.app-sidenav { | ||
padding: 10px; | ||
min-width: 100px; | ||
} | ||
|
||
.app-content md-checkbox { | ||
margin: 10px; | ||
} | ||
|
||
.app-toolbar-filler { | ||
flex: 1 1 auto; | ||
} | ||
|
||
.app-toolbar-menu { | ||
padding: 0 14px 0 14px; | ||
color: white; | ||
} | ||
|
||
.app-icon-button { | ||
box-shadow: none; | ||
user-select: none; | ||
background: none; | ||
border: none; | ||
cursor: pointer; | ||
filter: none; | ||
font-weight: normal; | ||
height: auto; | ||
line-height: inherit; | ||
margin: 0; | ||
min-width: 0; | ||
padding: 0; | ||
text-align: left; | ||
text-decoration: none; | ||
} | ||
|
||
.app-action { | ||
display: inline-block; | ||
position: fixed; | ||
bottom: 20px; | ||
right: 20px; | ||
} | ||
|
||
.app-spinner { | ||
height: 30px; | ||
width: 30px; | ||
display: inline-block; | ||
} | ||
|
||
.app-input-icon { | ||
font-size: 16px; | ||
} | ||
|
||
.app-list { | ||
border: 1px solid rgba(0,0,0,0.12); | ||
width: 350px; | ||
margin: 20px; | ||
} | ||
|
||
.app-progress { | ||
margin: 20px; | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,2 @@ | ||
<ul> | ||
<li *ngFor="let item of items | async"> | ||
<span (click)=selectItem(item)>{{ item.name }}</span> | ||
</li> | ||
</ul> | ||
|
||
<span class="app-action"> | ||
<button md-fab (click)="openDialog()" ><md-icon>playlist_add</md-icon></button> | ||
</span> | ||
<h1>{{title}}</h1> | ||
<router-outlet></router-outlet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { CanActivate, Router } from '@angular/router'; | ||
import { FirebaseAuth, FirebaseAuthState } from 'angularfire2'; | ||
import { Observable } from 'rxjs/Observable'; | ||
|
||
import 'rxjs/add/operator/do'; | ||
import 'rxjs/add/operator/map'; | ||
import 'rxjs/add/operator/take'; | ||
|
||
@Injectable() | ||
export class AuthGuardService implements CanActivate { | ||
|
||
constructor(private auth: FirebaseAuth, private router: Router) { } | ||
|
||
canActivate(): Observable<boolean> { | ||
return this.auth | ||
.take(1) | ||
.map((authState: FirebaseAuthState) => !!authState) | ||
.do(authenticated => { | ||
if (!authenticated) { | ||
this.router.navigate(['/login']); | ||
}; | ||
}); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
md-sidenav-layout.m2app-dark { | ||
background: black; | ||
} | ||
|
||
.app-content { | ||
padding: 20px; | ||
} | ||
|
||
.app-content md-card { | ||
margin: 20px; | ||
} | ||
|
||
.app-sidenav { | ||
padding: 10px; | ||
min-width: 100px; | ||
} | ||
|
||
.app-content md-checkbox { | ||
margin: 10px; | ||
} | ||
|
||
.app-toolbar-filler { | ||
flex: 1 1 auto; | ||
} | ||
|
||
.app-toolbar-menu { | ||
padding: 0 14px 0 14px; | ||
color: white; | ||
} | ||
|
||
.app-icon-button { | ||
box-shadow: none; | ||
user-select: none; | ||
background: none; | ||
border: none; | ||
cursor: pointer; | ||
filter: none; | ||
font-weight: normal; | ||
height: auto; | ||
line-height: inherit; | ||
margin: 0; | ||
min-width: 0; | ||
padding: 0; | ||
text-align: left; | ||
text-decoration: none; | ||
} | ||
|
||
.app-action { | ||
display: inline-block; | ||
position: fixed; | ||
bottom: 20px; | ||
right: 20px; | ||
} | ||
|
||
.app-spinner { | ||
height: 30px; | ||
width: 30px; | ||
display: inline-block; | ||
} | ||
|
||
.app-input-icon { | ||
font-size: 16px; | ||
} | ||
|
||
.app-list { | ||
border: 1px solid rgba(0,0,0,0.12); | ||
width: 350px; | ||
margin: 20px; | ||
} | ||
|
||
.app-progress { | ||
margin: 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<ul> | ||
<li *ngFor="let item of items | async"> | ||
<span (click)=selectItem(item)>{{ item.name }}</span> | ||
</li> | ||
</ul> | ||
|
||
<button class="btn btn-primary btn-lg" (click)="logout()">Logout</button> | ||
|
||
<span class="app-action"> | ||
<button md-fab (click)="openDialog()" ><md-icon>playlist_add</md-icon></button> | ||
</span> |
Oops, something went wrong.