[Astal] Battery widget: Show waiting

This commit is contained in:
2025-10-09 09:33:21 +02:00
parent 2314a17066
commit aa9ebaf22b

View File

@@ -41,10 +41,10 @@ export const BatteryBox = () => {
); );
}; };
const toTime = (time: number) => {
const MINUTE = 60; const MINUTE = 60;
const HOUR = MINUTE * 60; const HOUR = MINUTE * 60;
const toTime = (time: number) => {
if (!time) return "Waiting on BIOS"
if (time > 24 * HOUR) return "24h+"; if (time > 24 * HOUR) return "24h+";
const hours = Math.round(time / HOUR); const hours = Math.round(time / HOUR);