Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
adjusted for prod build
  • Loading branch information
ema14006 committed Apr 20, 2019
1 parent e134281 commit 7b37797
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/header/header.component.html
Expand Up @@ -13,7 +13,7 @@
<a class="nav-image" id="dash-image" (click)="resetGenerator()"><img src="assets/images/home.png" <a class="nav-image" id="dash-image" (click)="resetGenerator()"><img src="assets/images/home.png"
class=" d-block img-fluid py-3 pl-3" alt="Dashboard Image" height="42" width="42"></a> class=" d-block img-fluid py-3 pl-3" alt="Dashboard Image" height="42" width="42"></a>
</li> </li>
<li class="nav-item" *ngIf="router.url != '/' && router.url != '/#' "> <li class="nav-item" *ngIf="isLoggedIn()">
<a class="nav-image" id="visualize-image" (click)="resetGenAndVisualize()"><img src="assets/images/graph.jpg" <a class="nav-image" id="visualize-image" (click)="resetGenAndVisualize()"><img src="assets/images/graph.jpg"
class=" d-block img-fluid py-3 pl-3" alt="Visualization Image" height="42" width="42"></a> class=" d-block img-fluid py-3 pl-3" alt="Visualization Image" height="42" width="42"></a>
</li> </li>
Expand All @@ -22,7 +22,7 @@
<form class="form-inline my-2 my-lg-0"> <form class="form-inline my-2 my-lg-0">
<a class="nav-left-image" id="logout-image" (click)="resetAndClear()"><img <a class="nav-left-image" id="logout-image" (click)="resetAndClear()"><img
src="assets/images/logout.png" class=" d-block img-fluid py-3 pl-3" alt="Logout Image" src="assets/images/logout.png" class=" d-block img-fluid py-3 pl-3" alt="Logout Image"
height="42" width="42" *ngIf="router.url != '/' && router.url != '/#' "></a> height="42" width="42" *ngIf="isLoggedIn()"></a>
</form> </form>


</div> </div>
Expand Down
11 changes: 11 additions & 0 deletions src/app/header/header.component.ts
Expand Up @@ -23,6 +23,17 @@ export class HeaderComponent implements OnInit {
resetGenAndVisualize() { resetGenAndVisualize() {
this.resetAndRedirect('/visualize-all'); this.resetAndRedirect('/visualize-all');
} }
isLoggedIn()
{
if(this.router.url != '/' && this.router.url != '/#')
{
return true;
}
else
{
return false;
}
}


resetAndRedirect(url: string) { resetAndRedirect(url: string) {
this.login.getToken().then(() => { this.login.getToken().then(() => {
Expand Down

0 comments on commit 7b37797

Please sign in to comment.