Skip to content
Snippets Groups Projects
Commit 7a9a9a2f authored by mathias.chouet's avatar mathias.chouet
Browse files

Disable "new session" side menu entry when no calculator is open

parent c05d5b26
No related branches found
No related tags found
No related merge requests found
......@@ -86,7 +86,11 @@
<mat-icon>add</mat-icon>
{{ uitextSidenavNewCalc }}
</a>
<a id="side-nav-empty-session" (click)="sidenav.close(); emptySession()">
<a *ngIf="enableEmptySessionMenu" id="side-nav-empty-session" (click)="sidenav.close(); emptySession()">
<mat-icon>insert_drive_file</mat-icon>
{{ uitextSidenavEmptySession }}
</a>
<a *ngIf="! enableEmptySessionMenu" id="side-nav-empty-session" class="disabled-link">
<mat-icon>insert_drive_file</mat-icon>
{{ uitextSidenavEmptySession }}
</a>
......
......@@ -305,6 +305,10 @@ export class AppComponent implements OnInit, OnDestroy, Observer {
return this._calculators.length > 0;
}
public get enableEmptySessionMenu(): boolean {
return this._calculators.length > 0;
}
// interface Observer
update(sender: any, data: any): void {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment