mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-07-06 01:42:11 +02: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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
import { Button } from './ui/button';
|
import { Button } from './ui/button';
|
||||||
import {
|
import {
|
||||||
resolvePath,
|
resolvePath,
|
||||||
|
parsePathHops,
|
||||||
calculateDistance,
|
calculateDistance,
|
||||||
isValidLocation,
|
isValidLocation,
|
||||||
formatDistance,
|
formatDistance,
|
||||||
@@ -60,6 +61,15 @@ export function PathModal({ open, onClose, paths, senderInfo, contacts, config }
|
|||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
<div className="flex-1 overflow-y-auto py-2 space-y-4">
|
<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) => (
|
{resolvedPaths.map((pathData, index) => (
|
||||||
<div key={index}>
|
<div key={index}>
|
||||||
{!hasSinglePath && (
|
{!hasSinglePath && (
|
||||||
|
|||||||
Reference in New Issue
Block a user