fix: remove battery widget if there is no battery
This commit is contained in:
@@ -109,6 +109,9 @@ function Battery() {
|
||||
return { label: `${full_percentage == 100 ? "FULL" : "BAT"}: ${full_percentage}%` }
|
||||
})
|
||||
|
||||
if (!battery.is_battery) {
|
||||
return <></>
|
||||
}
|
||||
return <box className="status-box">
|
||||
<label label={battery_info((i) => i.label)} />
|
||||
</box>
|
||||
|
||||
Reference in New Issue
Block a user