2018-10-05 16:34:08 +02:00
|
|
|
<mat-sidenav-container #siteContainer class='main-container' (backdropClick)="toggleSideNav()">
|
|
|
|
<mat-sidenav #sideNav [mode]="vp.isMobile ? 'push' : 'side'" [opened]='!vp.isMobile' disableClose='!vp.isMobile'
|
|
|
|
class="side-panel">
|
2018-07-26 16:40:34 +02:00
|
|
|
<mat-toolbar class='nav-toolbar'>
|
2018-06-29 17:24:44 +02:00
|
|
|
<!-- logo -->
|
2018-10-05 16:34:08 +02:00
|
|
|
<mat-toolbar-row class='os-logo-container' routerLink='/' (click)="toggleSideNav()"></mat-toolbar-row>
|
2018-06-29 17:24:44 +02:00
|
|
|
</mat-toolbar>
|
2018-06-25 17:03:52 +02:00
|
|
|
|
2018-06-29 17:24:44 +02:00
|
|
|
<!-- User Menu -->
|
2018-07-26 16:40:34 +02:00
|
|
|
<mat-expansion-panel class='user-menu mat-elevation-z0'>
|
2018-06-29 17:24:44 +02:00
|
|
|
<mat-expansion-panel-header>
|
2018-07-06 09:38:25 +02:00
|
|
|
<!-- Get the username from operator -->
|
|
|
|
{{username}}
|
2018-06-29 17:24:44 +02:00
|
|
|
</mat-expansion-panel-header>
|
2018-08-03 11:05:21 +02:00
|
|
|
<mat-nav-list>
|
2018-08-09 13:45:48 +02:00
|
|
|
<a mat-list-item [matMenuTriggerFor]="languageMenu">
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>language</mat-icon>
|
2018-08-09 13:45:48 +02:00
|
|
|
<span> {{getLangName(this.translate.currentLang)}} </span>
|
|
|
|
</a>
|
2018-08-28 11:07:10 +02:00
|
|
|
<a *ngIf="isLoggedIn" (click)='editProfile()' mat-list-item>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>person</mat-icon>
|
2018-08-03 11:05:21 +02:00
|
|
|
<span translate>Edit Profile</span>
|
|
|
|
</a>
|
2018-08-28 11:07:10 +02:00
|
|
|
<a *ngIf="isLoggedIn" (click)='changePassword()' mat-list-item>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>vpn_key</mat-icon>
|
2018-08-03 11:05:21 +02:00
|
|
|
<span translate>Change Password</span>
|
|
|
|
</a>
|
|
|
|
<mat-divider></mat-divider>
|
2018-08-28 11:07:10 +02:00
|
|
|
<a *ngIf="isLoggedIn" (click)='logout()' mat-list-item>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>exit_to_app</mat-icon>
|
2018-08-03 11:05:21 +02:00
|
|
|
<span translate>Logout</span>
|
|
|
|
</a>
|
2018-08-28 11:07:10 +02:00
|
|
|
<a *ngIf="!isLoggedIn" routerLink='/login' mat-list-item>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>exit_to_app</mat-icon>
|
2018-08-28 11:07:10 +02:00
|
|
|
<span translate>Login</span>
|
|
|
|
</a>
|
2018-08-03 11:05:21 +02:00
|
|
|
</mat-nav-list>
|
2018-06-29 17:24:44 +02:00
|
|
|
</mat-expansion-panel>
|
2018-08-09 13:45:48 +02:00
|
|
|
<!-- TODO: Could use translate.getLangs() to fetch available languages-->
|
|
|
|
<mat-menu #languageMenu="matMenu">
|
|
|
|
<button mat-menu-item (click)='selectLang("en")' translate>English</button>
|
|
|
|
<button mat-menu-item (click)='selectLang("de")' translate>German</button>
|
|
|
|
<button mat-menu-item (click)='selectLang("fr")' translate>French</button>
|
|
|
|
</mat-menu>
|
2018-06-25 17:03:52 +02:00
|
|
|
|
2018-06-29 17:24:44 +02:00
|
|
|
<!-- navigation -->
|
2018-07-26 16:40:34 +02:00
|
|
|
<mat-nav-list class='main-nav'>
|
2018-09-20 13:03:51 +02:00
|
|
|
<span *ngFor="let entry of mainMenuService.entries">
|
2018-10-05 16:34:08 +02:00
|
|
|
<a [@navItemAnim] *osPerms="entry.permission" mat-list-item (click)='toggleSideNav()' [routerLink]='entry.route'
|
|
|
|
routerLinkActive='active' [routerLinkActiveOptions]="{exact: entry.route === '/'}">
|
|
|
|
<mat-icon>{{ entry.icon }}</mat-icon>
|
|
|
|
<span translate>{{ entry.displayName | translate}}</span>
|
|
|
|
|
2018-09-20 13:03:51 +02:00
|
|
|
</a>
|
|
|
|
</span>
|
2018-08-14 12:55:45 +02:00
|
|
|
<mat-divider></mat-divider>
|
2018-10-05 16:34:08 +02:00
|
|
|
<a [@navItemAnim] *osPerms="'core.can_see_projector'" mat-list-item routerLink='/projector'
|
|
|
|
routerLinkActive='active' (click)='toggleSideNav()'>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>videocam</mat-icon>
|
2018-08-14 12:55:45 +02:00
|
|
|
<span translate>Projector</span>
|
|
|
|
</a>
|
2018-06-29 17:24:44 +02:00
|
|
|
</mat-nav-list>
|
|
|
|
</mat-sidenav>
|
2018-10-05 16:34:08 +02:00
|
|
|
<mat-sidenav-content>
|
|
|
|
<div (touchstart)="swipe($event, 'start')" (touchend)="swipe($event, 'end')" class="content">
|
|
|
|
<div class="relax">
|
|
|
|
<main [@pageTransition]="o.isActivated ? o.activatedRoute : ''">
|
|
|
|
<router-outlet #o="outlet"></router-outlet>
|
|
|
|
</main>
|
|
|
|
<footer>
|
|
|
|
<os-footer></os-footer>
|
|
|
|
</footer>
|
|
|
|
</div>
|
2018-09-04 11:35:50 +02:00
|
|
|
</div>
|
2018-10-05 16:34:08 +02:00
|
|
|
</mat-sidenav-content>
|
2018-08-23 16:49:51 +02:00
|
|
|
</mat-sidenav-container>
|