mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-14 01:25:38 -05:00
Tweaks for phones and tablets
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
<span>Home Monitor</span>
|
<span>Home Monitor</span>
|
||||||
</mat-toolbar>
|
</mat-toolbar>
|
||||||
<mat-sidenav-container class="sidenav-container">
|
<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>
|
<mat-nav-list>
|
||||||
<a routerLink="/" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" mat-list-item>
|
<a routerLink="/" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" mat-list-item>
|
||||||
<mat-icon matListIcon class="nav-icon">
|
<mat-icon matListIcon class="nav-icon">
|
||||||
|
|||||||
@@ -9,7 +9,14 @@ import { map, shareReplay } from 'rxjs/operators';
|
|||||||
styleUrls: ['./nav.component.scss']
|
styleUrls: ['./nav.component.scss']
|
||||||
})
|
})
|
||||||
export class NavComponent {
|
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(
|
.pipe(
|
||||||
map(result => result.matches),
|
map(result => result.matches),
|
||||||
shareReplay()
|
shareReplay()
|
||||||
|
|||||||
Reference in New Issue
Block a user