[Astal] Battery widget: Show waiting
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user