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