mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
guh
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>webui</title>
|
||||
<script type="module" crossorigin src="/assets/index-sCjLoHHT.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-CFSn5fM6.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BLqBO1Eu.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -157,7 +157,17 @@ export default function VideoTile({ sessionInfo, label, forceMute = false, telem
|
||||
}
|
||||
|
||||
function BatteryBar({ charge, capacity, config, label, status }) {
|
||||
if (charge == null || !config?.full || config.warn == null) {
|
||||
if (!config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const normalizedConfig = {
|
||||
full: config.full ?? config.Full ?? 0,
|
||||
warn: config.warn ?? config.Warn ?? 0,
|
||||
urgent: config.urgent ?? config.Urgent ?? null,
|
||||
};
|
||||
|
||||
if (charge == null || normalizedConfig.full === 0 || normalizedConfig.warn == null) {
|
||||
return (
|
||||
<div className="rounded-sm bg-[#1e1e1e] px-2 py-1 text-sm text-slate-200">
|
||||
<div className="flex items-center justify-between text-xs text-slate-400">
|
||||
@@ -168,11 +178,6 @@ function BatteryBar({ charge, capacity, config, label, status }) {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
const normalizedConfig = {
|
||||
full: config.full ?? config.Full ?? 0,
|
||||
warn: config.warn ?? config.Warn ?? 0,
|
||||
urgent: config.urgent ?? config.Urgent ?? null,
|
||||
};
|
||||
|
||||
const span = normalizedConfig.full - normalizedConfig.warn;
|
||||
if (span <= 0) return null;
|
||||
|
||||
Reference in New Issue
Block a user