@@ -1029,162 +549,16 @@ export function App() {
>
) : (
<>
-
-
-
- {activeConversation.type === 'channel' &&
- !activeConversation.name.startsWith('#') &&
- activeConversation.name !== 'Public'
- ? '#'
- : ''}
- {activeConversation.name}
-
- {
- e.stopPropagation();
- navigator.clipboard.writeText(activeConversation.id);
- toast.success(
- activeConversation.type === 'channel'
- ? 'Room key copied!'
- : 'Contact key copied!'
- );
- }}
- title="Click to copy"
- >
- {activeConversation.type === 'channel'
- ? activeConversation.id.toLowerCase()
- : activeConversation.id}
-
- {activeConversation.type === 'contact' &&
- (() => {
- const contact = contacts.find(
- (c) => c.public_key === activeConversation.id
- );
- if (!contact) return null;
- const parts: React.ReactNode[] = [];
- if (contact.last_seen) {
- parts.push(`Last heard: ${formatTime(contact.last_seen)}`);
- }
- if (contact.last_path_len === -1) {
- parts.push('flood');
- } else if (contact.last_path_len === 0) {
- parts.push('direct');
- } else if (contact.last_path_len > 0) {
- parts.push(
- `${contact.last_path_len} hop${contact.last_path_len > 1 ? 's' : ''}`
- );
- }
- // Add coordinate link if contact has valid location
- if (isValidLocation(contact.lat, contact.lon)) {
- // Calculate distance from us if we have valid location
- const distFromUs =
- config && isValidLocation(config.lat, config.lon)
- ? calculateDistance(
- config.lat,
- config.lon,
- contact.lat,
- contact.lon
- )
- : null;
- parts.push(
-
- {
- e.stopPropagation();
- const url =
- window.location.origin +
- window.location.pathname +
- getMapFocusHash(contact.public_key);
- window.open(url, '_blank');
- }}
- title="View on map"
- >
- {contact.lat!.toFixed(3)}, {contact.lon!.toFixed(3)}
-
- {distFromUs !== null && ` (${formatDistance(distFromUs)})`}
-
- );
- }
- return parts.length > 0 ? (
-
- (
- {parts.map((part, i) => (
-
- {i > 0 && ', '}
- {part}
-
- ))}
- )
-
- ) : null;
- })()}
-
-
- {/* Direct trace button (contacts only) */}
- {activeConversation.type === 'contact' && (
-
- )}
- {/* Favorite button */}
- {(activeConversation.type === 'channel' ||
- activeConversation.type === 'contact') && (
-
- )}
- {/* Delete button */}
- {!(
- activeConversation.type === 'channel' &&
- activeConversation.name === 'Public'
- ) && (
-
- )}
-
-