mirror of
https://github.com/SupertigerDev/waybar-online.git
synced 2026-03-24 08:06:37 +00:00
fix bugs
This commit is contained in:
@@ -23,7 +23,7 @@ export const createLabel = (opts: LabelOpts) => {
|
|||||||
return format;
|
return format;
|
||||||
};
|
};
|
||||||
|
|
||||||
const setFormat = (value?: string) => (format = value || "format");
|
const setFormat = (value?: string) => (format = value || "");
|
||||||
|
|
||||||
const element = document.createElement("span");
|
const element = document.createElement("span");
|
||||||
if (opts.interval && opts.update) {
|
if (opts.interval && opts.update) {
|
||||||
|
|||||||
@@ -41,10 +41,8 @@ export const createBatteryModule = (
|
|||||||
// const battery = await navigator.getBattery();
|
// const battery = await navigator.getBattery();
|
||||||
|
|
||||||
const battery = {
|
const battery = {
|
||||||
// level: Math.random(),
|
level: Math.random(),
|
||||||
// charging: Math.random() > 0.5,
|
charging: Math.random() > 0.5,
|
||||||
level: 0.1,
|
|
||||||
charging: true,
|
|
||||||
};
|
};
|
||||||
const batteryPercent = Math.round(battery.level * 100);
|
const batteryPercent = Math.round(battery.level * 100);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user