mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-03-28 17:43:05 +01:00
Ads echo paths modal
This commit is contained in:
@@ -462,7 +462,26 @@ export function MessageList({
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
{msg.outgoing && (msg.acked > 0 ? ` ✓${msg.acked > 1 ? msg.acked : ''}` : ' ?')}
|
||||
{msg.outgoing && (msg.acked > 0
|
||||
? msg.paths && msg.paths.length > 0
|
||||
? <span
|
||||
className="cursor-pointer hover:text-primary"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
setSelectedPath({
|
||||
paths: msg.paths!,
|
||||
senderInfo: {
|
||||
name: config?.name || 'Unknown',
|
||||
publicKeyOrPrefix: config?.public_key || '',
|
||||
lat: config?.lat ?? null,
|
||||
lon: config?.lon ?? null,
|
||||
},
|
||||
});
|
||||
}}
|
||||
title="View echo paths"
|
||||
>{` ✓${msg.acked > 1 ? msg.acked : ''}`}</span>
|
||||
: ` ✓${msg.acked > 1 ? msg.acked : ''}`
|
||||
: ' ?')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
import { Button } from './ui/button';
|
||||
import {
|
||||
resolvePath,
|
||||
parsePathHops,
|
||||
calculateDistance,
|
||||
isValidLocation,
|
||||
formatDistance,
|
||||
@@ -60,6 +61,15 @@ export function PathModal({ open, onClose, paths, senderInfo, contacts, config }
|
||||
</DialogHeader>
|
||||
|
||||
<div className="flex-1 overflow-y-auto py-2 space-y-4">
|
||||
{/* Raw path summary */}
|
||||
<div className="text-xs font-mono text-muted-foreground/70 pb-2 border-b border-border">
|
||||
{paths.map((p, index) => {
|
||||
const hops = parsePathHops(p.path);
|
||||
const rawPath = hops.length > 0 ? hops.join('->') : 'direct';
|
||||
return <div key={index}>{rawPath}</div>;
|
||||
})}
|
||||
</div>
|
||||
|
||||
{resolvedPaths.map((pathData, index) => (
|
||||
<div key={index}>
|
||||
{!hasSinglePath && (
|
||||
|
||||
Reference in New Issue
Block a user