|
12 | 12 | <mat-card class="dashboard-card"> |
13 | 13 | <mat-card-header> |
14 | 14 | <mat-card-title> |
15 | | - Battery Level <span *ngIf="(battery.device | async) as device">({{ device.name }})</span> |
| 15 | + Battery Level |
16 | 16 | <button mat-icon-button class="more-button" [matMenuTriggerFor]="menuBattery" aria-label="Toggle menu"> |
17 | 17 | <mat-icon>more_vert</mat-icon> |
18 | 18 | </button> |
19 | 19 | <mat-menu #menuBattery="matMenu" xPosition="before"> |
20 | | - <button mat-menu-item *ngIf="(battery.device | async) === undefined" (click)="battery.requestValue()"> |
| 20 | + <button mat-menu-item *ngIf="(battery.device | async) === null" (click)="battery.requestValue()"> |
21 | 21 | <mat-icon>bluetooth_searching</mat-icon> |
22 | 22 | Connect |
23 | 23 | </button> |
|
27 | 27 | </button> |
28 | 28 | </mat-menu> |
29 | 29 | </mat-card-title> |
| 30 | + <mat-card-subtitle *ngIf="(battery.device | async) as device"> |
| 31 | + {{ device.name }} |
| 32 | + </mat-card-subtitle> |
30 | 33 | </mat-card-header> |
31 | 34 | <mat-card-content class="dashboard-card-content"> |
32 | 35 | <ble-battery-level #battery></ble-battery-level> |
|
40 | 43 | <mat-card class="dashboard-card"> |
41 | 44 | <mat-card-header> |
42 | 45 | <mat-card-title> |
43 | | - Humidity Level <span *ngIf="(humidity.device | async) as device">({{ device.name }})</span> |
| 46 | + Humidity Level |
44 | 47 | <button mat-icon-button class="more-button" [matMenuTriggerFor]="menuHumidity" aria-label="Toggle menu"> |
45 | 48 | <mat-icon>more_vert</mat-icon> |
46 | 49 | </button> |
47 | 50 | <mat-menu #menuHumidity="matMenu" xPosition="before"> |
48 | | - <button mat-menu-item *ngIf="(humidity.device | async) === undefined" (click)="humidity.requestValue()"> |
| 51 | + <button mat-menu-item *ngIf="(humidity.device | async) === null" (click)="humidity.requestValue()"> |
49 | 52 | <mat-icon>bluetooth_searching</mat-icon> |
50 | 53 | Connect |
51 | 54 | </button> |
|
55 | 58 | </button> |
56 | 59 | </mat-menu> |
57 | 60 | </mat-card-title> |
| 61 | + <mat-card-subtitle *ngIf="(humidity.device | async) as device"> |
| 62 | + {{ device.name }} |
| 63 | + </mat-card-subtitle> |
58 | 64 | </mat-card-header> |
59 | 65 | <mat-card-content class="dashboard-card-content"> |
60 | 66 | <ble-humidity #humidity></ble-humidity> |
|
68 | 74 | <mat-card class="dashboard-card"> |
69 | 75 | <mat-card-header> |
70 | 76 | <mat-card-title> |
71 | | - Temperature <span *ngIf="(temperature.device | async) as device">({{ device.name }})</span> |
| 77 | + Temperature |
72 | 78 | <button mat-icon-button class="more-button" [matMenuTriggerFor]="menuTemperature" aria-label="Toggle menu"> |
73 | 79 | <mat-icon>more_vert</mat-icon> |
74 | 80 | </button> |
75 | 81 | <mat-menu #menuTemperature="matMenu" xPosition="before"> |
76 | | - <button mat-menu-item *ngIf="(temperature.device | async) === undefined" (click)="temperature.requestValue()"> |
| 82 | + <button mat-menu-item *ngIf="(temperature.device | async) === null" (click)="temperature.requestValue()"> |
77 | 83 | <mat-icon>bluetooth_searching</mat-icon> |
78 | 84 | Connect |
79 | 85 | </button> |
|
83 | 89 | </button> |
84 | 90 | </mat-menu> |
85 | 91 | </mat-card-title> |
| 92 | + <mat-card-subtitle *ngIf="(temperature.device | async) as device"> |
| 93 | + {{ device.name }} |
| 94 | + </mat-card-subtitle> |
86 | 95 | </mat-card-header> |
87 | 96 | <mat-card-content class="dashboard-card-content"> |
88 | 97 | <ble-temperature #temperature></ble-temperature> |
|
0 commit comments