mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-13 00:18:50 +00:00
Allow widget field visibility to be configurable
This commit is contained in:
parent
756f6310af
commit
9b7d6b196f
30 changed files with 246 additions and 219 deletions
|
@ -17,11 +17,22 @@ export default function Component({ service }) {
|
|||
return <Container error={t("widget.api_error")} />;
|
||||
}
|
||||
|
||||
|
||||
if (!appsData || !messagesData || !clientsData) {
|
||||
return (
|
||||
<Container service={service}>
|
||||
<Block label="gotify.apps" />
|
||||
<Block label="gotify.clients" />
|
||||
<Block label="gotify.messages" />
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<Block label={t("gotify.apps")} value={appsData?.length} />
|
||||
<Block label={t("gotify.clients")} value={clientsData?.length} />
|
||||
<Block label={t("gotify.messages")} value={messagesData?.messages?.length} />
|
||||
<Container service={service}>
|
||||
<Block label="gotify.apps" value={appsData?.length} />
|
||||
<Block label="gotify.clients" value={clientsData?.length} />
|
||||
<Block label="gotify.messages" value={messagesData?.messages?.length} />
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue