Commit 0bfa571e authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

Add help (doc) button in navbar when calculators list is empty

Showing with 17 additions and 0 deletions
+17 -0
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
<button *ngIf="currentRoute != '/list'" mat-icon-button id="new-calculator" routerLink="/list" (click)="sidenav.close()"> <button *ngIf="currentRoute != '/list'" mat-icon-button id="new-calculator" routerLink="/list" (click)="sidenav.close()">
<mat-icon>add_box</mat-icon> <mat-icon>add_box</mat-icon>
</button> </button>
<a *ngIf="enableHeaderDoc" target="_blank" id="header-doc" href="/assets/docs-fr/index.html" (click)="sidenav.close()">
<mat-icon>help</mat-icon>
</a>
<mat-progress-bar *ngIf="showProgressBar" color="accent" id="loading-progress-bar" <mat-progress-bar *ngIf="showProgressBar" color="accent" id="loading-progress-bar"
[mode]="progressBarMode" [value]="progessBarValue"> [mode]="progressBarMode" [value]="progessBarValue">
......
...@@ -55,6 +55,16 @@ button:focus { ...@@ -55,6 +55,16 @@ button:focus {
} }
} }
#header-doc {
color: white;
transform: scale(1.4);
margin-top: 10px;
&:focus {
outline: 0;
}
}
#tabs-container { #tabs-container {
width: 100%; width: 100%;
} }
......
...@@ -272,6 +272,10 @@ export class AppComponent implements OnInit, OnDestroy, Observer { ...@@ -272,6 +272,10 @@ export class AppComponent implements OnInit, OnDestroy, Observer {
this.progressBarDeterminate = ! show; this.progressBarDeterminate = ! show;
} }
public get enableHeaderDoc() {
return this.currentRoute === "/list" && this._calculators.length === 0;
}
// interface Observer // interface Observer
update(sender: any, data: any): void { update(sender: any, data: any): void {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment