diff --git a/src/features/observers/ObserverPage.tsx b/src/features/observers/ObserverPage.tsx index 5621f45..2cc9a59 100644 --- a/src/features/observers/ObserverPage.tsx +++ b/src/features/observers/ObserverPage.tsx @@ -76,7 +76,7 @@ export function ObserverPage({ wsManager }: { wsManager: WsManager }) { brokerFilter={broker} onBrokerChange={setBroker} brokerOptions={brokers?.map((b) => b.name) ?? []} scopeFilter={scope} onScopeChange={setScope} scopeOptions={scopeOptions} trailing={{t("observerPage.range")} - setParams(observerDestination(params, id, observerRange(v)))} /> + setParams(observerDestination(params, id, observerRange(v)))} /> } />
diff --git a/src/features/routes/RouteTable.tsx b/src/features/routes/RouteTable.tsx index ba16d5a..583bab6 100644 --- a/src/features/routes/RouteTable.tsx +++ b/src/features/routes/RouteTable.tsx @@ -10,6 +10,7 @@ import { Timestamp } from "../../components/Timestamp"; import { DataTable, type Column } from "../../components/DataTable"; import { LoadingPill } from "../../components/LoadingPill"; import { MultiSelectDropdown } from "../../components/MultiSelectDropdown"; +import { useIsMobile } from "../../hooks/useMediaQuery"; import { RouteDetailPanel } from "./RouteDetailPanel"; import { ResolvedHopBlock } from "../packets/PathData"; import { formatHex } from "../../lib/formatters"; @@ -257,6 +258,7 @@ export function RouteTable(actions: RouteActions) { loadMore(); }, [search, serverIata, iatas, hasMore, isPaging, rows, loadedCount, loadMore]); + const isMobile = useIsMobile(); const panelOpen = Boolean(pathKey && routeIata || selectedRoute); const canSearch = !!(from.trim() && to.trim() && searchIatas.length >= 1); // clear any selection when the visible list changes out from under it (search submit/clear) @@ -279,36 +281,41 @@ export function RouteTable(actions: RouteActions) { {/* stacks into two rows on mobile (the inputs would otherwise wrap around the arrow); one row at md+ */}
- Find path + Find path setFrom(e.target.value)} onKeyDown={onKeyDown} /> → setTo(e.target.value)} onKeyDown={onKeyDown} />
- +
+ +
@@ -316,7 +323,7 @@ export function RouteTable(actions: RouteActions) { diff --git a/src/features/stats/Segmented.tsx b/src/features/stats/Segmented.tsx index ee905ac..b43e844 100644 --- a/src/features/stats/Segmented.tsx +++ b/src/features/stats/Segmented.tsx @@ -11,7 +11,7 @@ interface SegmentedProps { value: string; onChange: (value: string) => void; ariaLabel: string; - size?: "sm" | "md"; + size?: "xs" | "sm" | "md"; className?: string; } @@ -19,7 +19,8 @@ interface SegmentedProps { // tint + inset ring, inactive pills are muted. Used for the Stats sub-tabs (md, with icons) and the // time-range selector (sm). Active state is conveyed with aria-pressed, not color alone. export function Segmented({ options, value, onChange, ariaLabel, size = "sm", className }: SegmentedProps) { - const pad = size === "md" ? "px-3 py-1.5 text-xs" : "px-2.5 py-1 text-[11px]"; + // xs matches the 28px filter-bar controls it sits beside + const pad = size === "md" ? "px-3 py-1.5 text-xs" : size === "xs" ? "px-2.5 py-[3px] text-[11px] leading-4" : "px-2.5 py-1 text-[11px]"; return (