Skip to content

Commit

Permalink
Revert "Merge #17"
Browse files Browse the repository at this point in the history
This reverts commit ca6c662.
  • Loading branch information
Soltares committed Oct 16, 2024
1 parent ca6c662 commit 68e447d
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions ui/src/Nodes.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -152,21 +152,14 @@
</div>
<!-- Battery -->
<div title="Battery Level" 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 -->
⚡︎
{:else}
{node.deviceMetrics?.batteryLevel || 0}%
{/if}
{node.deviceMetrics?.batteryLevel || 0}%
<div
class="h-0.5"
style="width: {node.deviceMetrics?.batteryLevel || 0}%; background-color: {node.deviceMetrics?.batteryLevel === 101
? 'steelblue'
: node.deviceMetrics?.batteryLevel >= 70
? 'green'
: node.deviceMetrics?.batteryLevel >= 30
? 'yellow'
: 'red'};"
style="width: {node.deviceMetrics?.batteryLevel || 0}%; background-color: {node.deviceMetrics?.batteryLevel >= 70
? 'green'
: node.deviceMetrics?.batteryLevel >= 30
? 'yellow'
: 'red'};"
></div>
</div>

Expand Down

0 comments on commit 68e447d

Please sign in to comment.