forked from Shinonome/dots-hyprland
bluetooth menu: round battery level
This commit is contained in:
@@ -59,7 +59,7 @@ DialogListItem {
|
|||||||
if (!root.device?.paired) return "";
|
if (!root.device?.paired) return "";
|
||||||
let statusText = root.device?.connected ? Translation.tr("Connected") : Translation.tr("Paired");
|
let statusText = root.device?.connected ? Translation.tr("Connected") : Translation.tr("Paired");
|
||||||
if (!root.device?.batteryAvailable) return statusText;
|
if (!root.device?.batteryAvailable) return statusText;
|
||||||
statusText += ` • ${root.device?.battery * 100}%`;
|
statusText += ` • ${Math.round(root.device?.battery * 100)}%`;
|
||||||
return statusText;
|
return statusText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user