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,11 +17,11 @@ export default function Component({ service }) {
if (!torrentData) {
return (
<Container>
<Block label={t("qbittorrent.leech")} />
<Block label={t("qbittorrent.download")} />
<Block label={t("qbittorrent.seed")} />
<Block label={t("qbittorrent.upload")} />
<Container service={service}>
<Block label="qbittorrent.leech" />
<Block label="qbittorrent.download" />
<Block label="qbittorrent.seed" />
<Block label="qbittorrent.upload" />
</Container>
);
}
@ -42,11 +42,11 @@ export default function Component({ service }) {
const leech = torrentData.length - completed;
return (
<Container>
<Block label={t("qbittorrent.leech")} value={t("common.number", { value: leech })} />
<Block label={t("qbittorrent.download")} value={t("common.bitrate", { value: rateDl })} />
<Block label={t("qbittorrent.seed")} value={t("common.number", { value: completed })} />
<Block label={t("qbittorrent.upload")} value={t("common.bitrate", { value: rateUl })} />
<Container service={service}>
<Block label="qbittorrent.leech" value={t("common.number", { value: leech })} />
<Block label="qbittorrent.download" value={t("common.bitrate", { value: rateDl })} />
<Block label="qbittorrent.seed" value={t("common.number", { value: completed })} />
<Block label="qbittorrent.upload" value={t("common.bitrate", { value: rateUl })} />
</Container>
);
}