battery: don't show .0

This commit is contained in:
end-4
2024-06-05 19:21:01 +07:00
committed by GitHub
parent 70fac17e32
commit f62b721a3a
+1 -1
View File
@@ -99,7 +99,7 @@ const BarBattery = () => Box({
Label({
className: 'txt-smallie',
setup: (self) => self.hook(Battery, label => {
label.label = `${Battery.percent.toFixed(1)}%`;
label.label = `${Number.parseFloat(Battery.percent.toFixed(1))}%`;
}),
}),
Overlay({