mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Allow widget field visibility to be configurable
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user