fix: simplify host status to online/offline and keep it live without a refresh

This commit is contained in:
LukeGus committed 2026-10-04 14:18:50 -05:00
1 parent 2646b649d7
commit 0a436ab3d8
48 files changed
+549 -789

No files matched your search

@@ -23,11 +23,9 @@ function StatusDot({ status }: { status: string }) {
const color =
status === "online"
? getAccentColor()
: status === "reachable"
? "#fbbf24"
: status === "offline"
? "#ef4444"
: "#6b7280";
: status === "offline"
? "#ef4444"
: "#6b7280";
return (
<span
className="w-1.5 h-1.5 rounded-full shrink-0 inline-block"
@@ -52,23 +52,20 @@ function HostStatusWidget({
);
}
const online = statusInfo?.status === "online";
const reachable = statusInfo?.status === "reachable";
const status = statusInfo?.status;
const online = status === "online";
const known = online || status === "offline";
const onlineColor = !statusInfo
const onlineColor = !known
? "#6b7280"
: online
? getAccentColor()
: reachable
? "#fbbf24"
: "#ef4444";
const onlineLabel = !statusInfo
: "#ef4444";
const onlineLabel = !known
? t("common.unknown")
: online
? t("common.online")
: reachable
? t("common.signInFailed")
: t("common.offline");
: t("common.offline");
return (
<div className="flex flex-col w-full h-full overflow-hidden">