From ead6402d46d9dc8a973b5fdd981f32882741ffa4 Mon Sep 17 00:00:00 2001 From: 0forks <114709761+0forks@users.noreply.github.com> Date: Sun, 12 Feb 2023 20:55:10 +0300 Subject: [PATCH] gui: Fix text wrapping in TrackerTable (#567) --- gui/src/components/tracker/TrackerStatus.tsx | 4 ++- gui/src/components/tracker/TrackerWifi.tsx | 10 +++++--- gui/src/components/tracker/TrackersTable.tsx | 26 +++++++++----------- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/gui/src/components/tracker/TrackerStatus.tsx b/gui/src/components/tracker/TrackerStatus.tsx index 7ae29f338..23559b53b 100644 --- a/gui/src/components/tracker/TrackerStatus.tsx +++ b/gui/src/components/tracker/TrackerStatus.tsx @@ -33,7 +33,9 @@ export function TrackerStatus({ status }: { status: number }) {
- {l10n.getString(statusLabel)} + + {l10n.getString(statusLabel)} + ); } diff --git a/gui/src/components/tracker/TrackerWifi.tsx b/gui/src/components/tracker/TrackerWifi.tsx index b1ee480a8..5669f387c 100644 --- a/gui/src/components/tracker/TrackerWifi.tsx +++ b/gui/src/components/tracker/TrackerWifi.tsx @@ -15,15 +15,19 @@ export function TrackerWifi({ textColor?: string; }) { return ( -
+
{!disabled && (
- {ping} ms + + {ping} ms + {rssiShowNumeric && ( - {rssi} dBm + + {rssi} dBm + )}
)} diff --git a/gui/src/components/tracker/TrackersTable.tsx b/gui/src/components/tracker/TrackersTable.tsx index f506a78a2..21dfc5aa6 100644 --- a/gui/src/components/tracker/TrackersTable.tsx +++ b/gui/src/components/tracker/TrackersTable.tsx @@ -62,8 +62,10 @@ export function TrackerNameCell({ tracker }: { tracker: TrackerDataT }) {
-
- {name} +
+ + {name} +
@@ -89,10 +91,8 @@ export function TrackerRotCell({ : useRawRotationEulerDegrees(); return ( - - - {formatVector3(rot, precise ? 2 : 0)} - + + {formatVector3(rot, precise ? 2 : 0)} ); } @@ -336,10 +336,8 @@ export function TrackersTable({ labelClassName: 'w-36', row: ({ tracker }) => tracker.linearAcceleration && ( - - - {formatVector3(tracker.linearAcceleration, 1)} - + + {formatVector3(tracker.linearAcceleration, 1)} ), })} @@ -350,10 +348,8 @@ export function TrackersTable({ labelClassName: 'w-36', row: ({ tracker }) => tracker.position && ( - - - {formatVector3(tracker.position, 2)} - + + {formatVector3(tracker.position, 2)} ), })} @@ -362,7 +358,7 @@ export function TrackersTable({ id: DisplayColumn.URL, label: l10n.getString('tracker-table-column-url'), row: ({ device }) => ( - + udp:// {IPv4.fromNumber( device?.hardwareInfo?.ipAddress?.addr || 0