Show node name if we find it in the DB already. Closes #128.

This commit is contained in:
Jack Kingsman
2026-03-30 12:28:26 -07:00
parent 7aa4f76064
commit db248302e9
6 changed files with 49 additions and 3 deletions
@@ -846,11 +846,16 @@ export function SettingsRadioSection({
className="rounded-md border border-input bg-background px-3 py-2"
>
<div className="flex items-center justify-between gap-3">
<span className="text-sm font-medium capitalize">{result.node_type}</span>
<span className="text-sm font-medium">
{result.name ?? <span className="capitalize">{result.node_type}</span>}
</span>
<span className="text-xs text-muted-foreground">
heard {result.heard_count} time{result.heard_count === 1 ? '' : 's'}
</span>
</div>
{result.name && (
<p className="text-xs capitalize text-muted-foreground">{result.node_type}</p>
)}
<p className="mt-1 break-all font-mono text-xs text-muted-foreground">
{result.public_key}
</p>
+1
View File
@@ -300,6 +300,7 @@ describe('SettingsModal', () => {
results: [
{
public_key: '11'.repeat(32),
name: null,
node_type: 'repeater',
heard_count: 2,
local_snr: 7.5,
+1
View File
@@ -34,6 +34,7 @@ export type RadioDiscoveryTarget = 'repeaters' | 'sensors' | 'all';
export interface RadioDiscoveryResult {
public_key: string;
name: string | null;
node_type: 'repeater' | 'sensor';
heard_count: number;
local_snr: number | null;