Fix wan display for service widget

pull/398/head
Michael Shamoon 2 years ago
parent 94f9ef3c30
commit 203783953d

@ -58,7 +58,7 @@ export default function Widget({ options }) {
return ( return (
<div className="flex-none flex flex-row items-center mr-3 py-1.5"> <div className="flex-none flex flex-row items-center mr-3 py-1.5">
<div className="flex flex-col"> <div className="flex flex-col">
<div className="flex flex-row ml-3"> <div className="flex flex-row ml-3 mb-0.5">
<SiUbiquiti className="text-theme-800 dark:text-theme-200 w-3 h-3 mr-1" /> <SiUbiquiti className="text-theme-800 dark:text-theme-200 w-3 h-3 mr-1" />
<div className="text-theme-800 dark:text-theme-200 text-xs font-bold flex flex-row justify-between"> <div className="text-theme-800 dark:text-theme-200 text-xs font-bold flex flex-row justify-between">
{name} {name}

@ -41,7 +41,7 @@ export default function Component({ service }) {
return ( return (
<Container service={service}> <Container service={service}>
{uptime && <Block label="unifi.uptime" value={ uptime } />} {uptime && <Block label="unifi.uptime" value={ uptime } />}
{wan.show && <Block label="unifi.wan" value={ wan.up ? t("unifi.up") : t("unifi.down") } />} {wan.show && <Block label="unifi.wan" value={ wan.status === "ok" ? t("unifi.up") : t("unifi.down") } />}
{lan.show && <Block label="unifi.lan_users" value={ t("common.number", { value: lan.num_user }) } />} {lan.show && <Block label="unifi.lan_users" value={ t("common.number", { value: lan.num_user }) } />}
{lan.show && !wlan.show && <Block label="unifi.lan_devices" value={ t("common.number", { value: lan.num_adopted }) } />} {lan.show && !wlan.show && <Block label="unifi.lan_devices" value={ t("common.number", { value: lan.num_adopted }) } />}

Loading…
Cancel
Save