2019-08-22 23:15:22 -04:00
|
|
|
<mat-toolbar id="toolbar">
|
2019-07-11 22:45:21 -04:00
|
|
|
<button mat-icon-button routerLink="/">
|
|
|
|
<img src="/assets/images/logo.png" height="35px" width="auto">
|
|
|
|
</button>
|
|
|
|
<small class="ml-1 text-muted">{{version}}</small>
|
|
|
|
<div class="ml-auto">
|
2019-08-22 23:15:22 -04:00
|
|
|
<div *ngFor="let item of menuItems; let i = index" class="d-inline mx-1">
|
|
|
|
<ng-container *ngIf="i <= maxMenuItems">
|
|
|
|
<ng-container *ngTemplateOutlet="menuItem; context: {$implicit: item}"></ng-container>
|
2019-07-11 22:45:21 -04:00
|
|
|
</ng-container>
|
|
|
|
</div>
|
2019-08-22 23:15:22 -04:00
|
|
|
<button *ngIf="menuItems.length > maxMenuItems" mat-icon-button [matMenuTriggerFor]="menu">
|
|
|
|
<mat-icon>menu</mat-icon>
|
|
|
|
</button>
|
|
|
|
<mat-menu #menu="matMenu">
|
|
|
|
<ng-container *ngFor="let item of menuItems; let i = index">
|
|
|
|
<ng-container *ngIf="i > maxMenuItems">
|
|
|
|
<button mat-menu-item>
|
|
|
|
<mat-icon>{{item.icon}}</mat-icon>
|
|
|
|
{{item.name}}
|
|
|
|
</button>
|
|
|
|
</ng-container>
|
|
|
|
</ng-container>
|
|
|
|
</mat-menu>
|
2019-07-11 22:45:21 -04:00
|
|
|
</div>
|
|
|
|
</mat-toolbar>
|
2019-08-22 23:15:22 -04:00
|
|
|
|
|
|
|
<ng-template #menuItem let-item>
|
|
|
|
<ng-container>
|
|
|
|
<button mat-icon-button [ngClass]="{'selected': item?.enabled}" class="ml-1" (click)="clickWrapper(item)">
|
|
|
|
<mat-icon>{{item?.icon}}</mat-icon>
|
|
|
|
</button>
|
|
|
|
</ng-container>
|
|
|
|
</ng-template>
|