Ver código fonte

Fix wan display for service widget

Michael Shamoon 2 anos atrás
pai
commit
203783953d

+ 1 - 1
src/components/widgets/unifi_console/unifi_console.jsx

@@ -58,7 +58,7 @@ export default function Widget({ options }) {
   return (
     <div className="flex-none flex flex-row items-center mr-3 py-1.5">
       <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" />
           <div className="text-theme-800 dark:text-theme-200 text-xs font-bold flex flex-row justify-between">
             {name}

+ 1 - 1
src/widgets/unifi/component.jsx

@@ -41,7 +41,7 @@ export default function Component({ service }) {
     return (
         <Container service={service}>
             {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 && !wlan.show && <Block label="unifi.lan_devices" value={ t("common.number", { value: lan.num_adopted }) } />}