Allow widget field visibility to be configurable

This commit is contained in:
Jason Fischer 2022-09-29 21:15:25 -07:00
parent 756f6310af
commit 9b7d6b196f
No known key found for this signature in database
30 changed files with 246 additions and 219 deletions

View file

@ -17,26 +17,26 @@ export default function Component({ service }) {
if (!speedtestData) {
return (
<Container>
<Block label={t("speedtest.download")} />
<Block label={t("speedtest.upload")} />
<Block label={t("speedtest.ping")} />
<Container service={service}>
<Block label="speedtest.download" />
<Block label="speedtest.upload" />
<Block label="speedtest.ping" />
</Container>
);
}
return (
<Container>
<Container service={service}>
<Block
label={t("speedtest.download")}
label="speedtest.download"
value={t("common.bitrate", { value: speedtestData.data.download * 1024 * 1024 })}
/>
<Block
label={t("speedtest.upload")}
label="speedtest.upload"
value={t("common.bitrate", { value: speedtestData.data.upload * 1024 * 1024 })}
/>
<Block
label={t("speedtest.ping")}
label="speedtest.ping"
value={t("common.ms", {
value: speedtestData.data.ping,
style: "unit",