Skip to content

Commit

Permalink
added case for 101% battery / external power
Browse files Browse the repository at this point in the history
Instead of reporting battery usage of 101%, display a ⚡︎ unicode icon and change colorbar representation to SteelBlue

modified code comment to:
<!-- device using external power -->
(previous Svelte comment threw syntax error)
  • Loading branch information
mblauser authored Oct 2, 2024
1 parent 85dc554 commit 8b5283d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/src/Nodes.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
</div>
<!-- Battery -->
<div class="text-sm font-normal bg-black/20 rounded p-1 min-w-11 h-7 text-center">
{#if node.deviceMetrics?.batteryLevel === 101 // device using external power}
{#if node.deviceMetrics?.batteryLevel === 101}
<!-- device using external power -->
⚡︎
{:else}
{node.deviceMetrics?.batteryLevel || 0}%
Expand Down

0 comments on commit 8b5283d

Please sign in to comment.