From 46fa7c581e50fcd567c7aec7a5d5d1120dd4e830 Mon Sep 17 00:00:00 2001 From: henrygd Date: Fri, 25 Sep 2026 18:53:04 -0400 Subject: [PATCH] use tooltip for all systems table cell --- .../systems-table/systems-table-columns.tsx | 54 ++++++++++++------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/internal/site/src/components/systems-table/systems-table-columns.tsx b/internal/site/src/components/systems-table/systems-table-columns.tsx index d4a6abb53..1c004d8b4 100644 --- a/internal/site/src/components/systems-table/systems-table-columns.tsx +++ b/internal/site/src/components/systems-table/systems-table-columns.tsx @@ -39,7 +39,7 @@ import { } from "@/lib/utils" import { batteryStateTranslations } from "@/lib/i18n" import { connectedWiFi, strongestWiFi, strongestWiFiSignal } from "@/lib/wifi" -import type { SystemRecord } from "@/types" +import type { SystemRecord, WiFi } from "@/types" import { SystemDialog } from "../add-system" import AlertButton from "../alerts/alert-button" import { $router, Link } from "../router" @@ -363,25 +363,41 @@ export function SystemsTableColumns(viewMode: "table" | "grid"): ColumnDef `${id}${wifi.s ? ` (${wifi.s})` : ""}: ${wifi.r === undefined ? "—" : `${wifi.r} dBm`}`) - .join("\n") + const signal = (wifi: WiFi) => (wifi.r === undefined ? "—" : `${wifi.r} dBm`) return ( - - {displayedConnections.map(([id, wifi]) => ( - - {wifi.r === undefined ? "—" : `${wifi.r} dBm`} - - ))} - {viewMode === "table" && connections.length > 1 && ( - +{connections.length - 1} - )} - + + + + {displayedConnections.map(([id, wifi]) => ( + + {signal(wifi)} + + ))} + {viewMode === "table" && connections.length > 1 && ( + +{connections.length - 1} + )} + + + +
+ {connections.map(([id, wifi]) => ( +
+
+ {id} +
+
+ {signal(wifi)} + {wifi.s && {wifi.s}} +
+
+ ))} +
+
+
) }, },