mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-06 21:57:48 +01:00
[BREAKING] Chore: remove deprecated widget field colorizing (#6043)
This commit is contained in:
@@ -38,11 +38,7 @@ export default function Component({ service }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const status = serverData.online ? (
|
const status = serverData.online ? t("gamedig.online") : t("gamedig.offline");
|
||||||
<span className="text-green-500">{t("gamedig.online")}</span>
|
|
||||||
) : (
|
|
||||||
<span className="text-red-500">{t("gamedig.offline")}</span>
|
|
||||||
);
|
|
||||||
const name = serverData.online ? serverData.name : "-";
|
const name = serverData.online ? serverData.name : "-";
|
||||||
const map = serverData.online ? serverData.map : "-";
|
const map = serverData.online ? serverData.map : "-";
|
||||||
const currentPlayers = serverData.online ? `${serverData.players} / ${serverData.maxplayers}` : "-";
|
const currentPlayers = serverData.online ? `${serverData.players} / ${serverData.maxplayers}` : "-";
|
||||||
|
|||||||
@@ -22,11 +22,7 @@ export default function Component({ service }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const statusIndicator = serverData.online ? (
|
const statusIndicator = serverData.online ? t("minecraft.up") : t("minecraft.down");
|
||||||
<span className="text-green-500">{t("minecraft.up")}</span>
|
|
||||||
) : (
|
|
||||||
<span className="text-red-500">{t("minecraft.down")}</span>
|
|
||||||
);
|
|
||||||
const players = serverData.players ? `${serverData.players.online} / ${serverData.players.max}` : "-";
|
const players = serverData.players ? `${serverData.players.online} / ${serverData.players.max}` : "-";
|
||||||
const version = serverData.version || "-";
|
const version = serverData.version || "-";
|
||||||
|
|
||||||
|
|||||||
@@ -20,16 +20,7 @@ export default function Component({ service }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
<Block
|
<Block label="widget.status" value={up ? t("openwrt.up") : t("openwrt.down")} />
|
||||||
label="widget.status"
|
|
||||||
value={
|
|
||||||
up ? (
|
|
||||||
<span className="text-green-500">{t("openwrt.up")}</span>
|
|
||||||
) : (
|
|
||||||
<span className="text-red-500">{t("openwrt.down")}</span>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<Block label="openwrt.bytesTx" value={t("common.bytes", { value: bytesTx })} />
|
<Block label="openwrt.bytesTx" value={t("common.bytes", { value: bytesTx })} />
|
||||||
<Block label="openwrt.bytesRx" value={t("common.bytes", { value: bytesRx })} />
|
<Block label="openwrt.bytesRx" value={t("common.bytes", { value: bytesRx })} />
|
||||||
</Container>
|
</Container>
|
||||||
|
|||||||
@@ -56,16 +56,7 @@ export default function Component({ service }) {
|
|||||||
label="pfsense.temp"
|
label="pfsense.temp"
|
||||||
value={t("common.number", { value: systemData.data.temp_c, style: "unit", unit: "celsius" })}
|
value={t("common.number", { value: systemData.data.temp_c, style: "unit", unit: "celsius" })}
|
||||||
/>
|
/>
|
||||||
<Block
|
<Block label="pfsense.wanStatus" value={wan.status === "up" ? t("pfsense.up") : t("pfsense.down")} />
|
||||||
label="pfsense.wanStatus"
|
|
||||||
value={
|
|
||||||
wan.status === "up" ? (
|
|
||||||
<span className="text-green-500">{t("pfsense.up")}</span>
|
|
||||||
) : (
|
|
||||||
<span className="text-red-500">{t("pfsense.down")}</span>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
{showWanIP && <Block label="pfsense.wanIP" value={wan.ipaddr} />}
|
{showWanIP && <Block label="pfsense.wanIP" value={wan.ipaddr} />}
|
||||||
{showDiskUsage && <Block label="pfsense.disk" value={t("common.percent", { value: diskUsage.toFixed(2) })} />}
|
{showDiskUsage && <Block label="pfsense.disk" value={t("common.percent", { value: diskUsage.toFixed(2) })} />}
|
||||||
</Container>
|
</Container>
|
||||||
|
|||||||
Reference in New Issue
Block a user