Enhancement: better support for raw values in block highlighting (#6434)

This commit is contained in:
shamoon
2026-03-17 09:12:01 -07:00
committed by GitHub
parent 6bdea294c1
commit fadb03ad27
35 changed files with 300 additions and 78 deletions
+11 -4
View File
@@ -25,14 +25,21 @@ export default function Component({ service }) {
);
}
const available = (usage?.total ?? 0) - (usage?.used ?? 0);
return (
<Container service={service}>
<Block label="filebrowser.available" value={t("common.bytes", { value: available })} highlightValue={available} />
<Block
label="filebrowser.available"
value={t("common.bytes", { value: (usage?.total ?? 0) - (usage?.used ?? 0) })}
label="filebrowser.used"
value={t("common.bytes", { value: usage?.used ?? 0 })}
highlightValue={usage?.used ?? 0}
/>
<Block
label="filebrowser.total"
value={t("common.bytes", { value: usage?.total ?? 0 })}
highlightValue={usage?.total ?? 0}
/>
<Block label="filebrowser.used" value={t("common.bytes", { value: usage?.used ?? 0 })} />
<Block label="filebrowser.total" value={t("common.bytes", { value: usage?.total ?? 0 })} />
</Container>
);
}