UPDATE : ADD coloration to headscale node status
This commit is contained in:
parent
499ab4d701
commit
ec431db19e
@ -31,13 +31,17 @@ export default function Component({ service }) {
|
|||||||
lastSeen,
|
lastSeen,
|
||||||
online,
|
online,
|
||||||
} = nodeData.node;
|
} = nodeData.node;
|
||||||
|
const statusIndicator = online ? (
|
||||||
|
<span className="text-green-500">{t("headscale.online")}</span>
|
||||||
|
) : (
|
||||||
|
<span className="text-red-500">{t("headscale.offline")}</span>
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
<Block label="headscale.name" value={givenName} />
|
<Block label="headscale.name" value={givenName} />
|
||||||
<Block label="headscale.address" value={address} />
|
<Block label="headscale.address" value={address} />
|
||||||
<Block label="headscale.last_seen" value={t("common.relativeDate", { value: lastSeen })} />
|
<Block label="headscale.last_seen" value={t("common.relativeDate", { value: lastSeen })} />
|
||||||
<Block label="headscale.status" value={t(online ? "headscale.online" : "headscale.offline")} />
|
<Block label="headscale.status" value={statusIndicator} />
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user