mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
Tweaks for phones and tablets
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<span>Home Monitor</span>
|
||||
</mat-toolbar>
|
||||
<mat-sidenav-container class="sidenav-container">
|
||||
<mat-sidenav #drawer class="sidenav" [attr.role]="(isHandset$ | async) ? 'dialog' : 'navigation'" [mode]="(isHandset$ | async) ? 'over' : 'side'" [opened]="(isHandset$ | async) ? false : true">
|
||||
<mat-sidenav #drawer (click)="drawer.toggle()" class="sidenav" [attr.role]="(isHandset$ | async) ? 'dialog' : 'navigation'" [mode]="(isHandset$ | async) ? 'over' : 'side'" [opened]="(isHandset$ | async) ? false : true">
|
||||
<mat-nav-list>
|
||||
<a routerLink="/" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" mat-list-item>
|
||||
<mat-icon matListIcon class="nav-icon">
|
||||
|
||||
@@ -9,7 +9,14 @@ import { map, shareReplay } from 'rxjs/operators';
|
||||
styleUrls: ['./nav.component.scss']
|
||||
})
|
||||
export class NavComponent {
|
||||
isHandset$: Observable<boolean> = this.breakpointObserver.observe(Breakpoints.Handset)
|
||||
isHandset$: Observable<boolean> = this.breakpointObserver.observe([
|
||||
Breakpoints.HandsetLandscape,
|
||||
Breakpoints.HandsetPortrait,
|
||||
Breakpoints.Handset,
|
||||
Breakpoints.TabletLandscape,
|
||||
Breakpoints.TabletPortrait,
|
||||
Breakpoints.Tablet
|
||||
])
|
||||
.pipe(
|
||||
map(result => result.matches),
|
||||
shareReplay()
|
||||
|
||||
Reference in New Issue
Block a user