Skip to content

Commit

Permalink
added some danger messages for out of bound values on the home screen
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-wilson committed Nov 15, 2023
1 parent fc0e49e commit 2985db4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ <h2>Power</h2>
<table *ngIf="info$ | async as info; else loading">
<tr>
<td>Power Consumption:</td>
<td>{{info.power | number: '1.2-2'}} <small>W</small></td>
<td>{{info.power | number: '1.2-2'}} <small>W</small> </td>
</tr>
<tr>
<td>Input Voltage:</td>
<td>{{info.voltage | number: '0.0-0'}} <small>mV</small></td>
<td>{{info.voltage | number: '0.0-0'}} <small>mV</small> <span class="danger"
*ngIf="info.voltage < 4950">&nbsp; Danger: Low voltage</span></td>
</tr>
<tr>
<td>Input Current:</td>
Expand All @@ -96,7 +97,8 @@ <h2>Power</h2>
</tr>
<tr>
<td>Chip Temperature:</td>
<td>{{info.temp}} <small>C</small></td>
<td>{{info.temp}} <small>C</small> <span class="danger" *ngIf="info.temp >= 70">&nbsp; Danger:
High Temperature</span></td>
</tr>
</table>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,9 @@ table>tr>td {
line-break: anywhere;

}
}

.danger {
color: red;
font-weight: bold;
}

0 comments on commit 2985db4

Please sign in to comment.