From e437ce74c675890f10aca4e78a574ee055842d36 Mon Sep 17 00:00:00 2001 From: Jack Kingsman Date: Wed, 1 Apr 2026 14:08:30 -0700 Subject: [PATCH] Surface repeater info pane just like contacts --- frontend/src/components/ContactInfoPane.tsx | 148 ++++++++++++++---- frontend/src/components/ConversationPane.tsx | 1 + frontend/src/components/RepeaterDashboard.tsx | 25 ++- .../settings/SettingsRadioSection.tsx | 4 +- 4 files changed, 138 insertions(+), 40 deletions(-) diff --git a/frontend/src/components/ContactInfoPane.tsx b/frontend/src/components/ContactInfoPane.tsx index 3f145fa..8e5e1e1 100644 --- a/frontend/src/components/ContactInfoPane.tsx +++ b/frontend/src/components/ContactInfoPane.tsx @@ -1,4 +1,4 @@ -import { type ReactNode, useEffect, useState } from 'react'; +import { type ReactNode, useEffect, useMemo, useState } from 'react'; import { Ban, Search, Star } from 'lucide-react'; import { LineChart, @@ -35,6 +35,7 @@ import { ContactAvatar } from './ContactAvatar'; import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from './ui/sheet'; import { toast } from './ui/sonner'; import { useDistanceUnit } from '../contexts/DistanceUnitContext'; +import { CONTACT_TYPE_REPEATER } from '../types'; import type { Contact, ContactActiveRoom, @@ -158,6 +159,7 @@ export function ContactInfoPane({ contact !== null && !isPrefixOnlyResolvedContact && isUnknownFullKeyContact(contact.public_key, contact.last_advert); + const isRepeater = contact?.type === CONTACT_TYPE_REPEATER; return ( !open && onClose()}> @@ -396,8 +398,8 @@ export function ContactInfoPane({ - {/* Block toggles */} - {(onToggleBlockedKey || onToggleBlockedName) && ( + {/* Block toggles (not applicable to repeaters) */} + {!isRepeater && (onToggleBlockedKey || onToggleBlockedName) && (
{onToggleBlockedKey && ( + ) : ( + {conversation.name} + )} + health.radio_device_info.max_contacts && (

- Your radio reports a hardware limit of {health.radio_device_info.max_contacts} contacts. - The effective cap will be limited to what the radio supports. + Your radio reports a hardware limit of {health.radio_device_info.max_contacts}{' '} + contacts. The effective cap will be limited to what the radio supports.

)}