mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-07 09:13:04 +02:00
Add contact hop data to help with debugging
This commit is contained in:
+16
-16
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -13,7 +13,7 @@
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||
<link rel="manifest" href="/site.webmanifest" />
|
||||
<script type="module" crossorigin src="/assets/index-CfOMUIYi.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-BqCjcbH8.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DZ67iE5i.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
+14
-2
@@ -588,9 +588,21 @@ export function App() {
|
||||
{activeConversation.id}
|
||||
{activeConversation.type === 'contact' && (() => {
|
||||
const contact = contacts.find(c => c.public_key === activeConversation.id);
|
||||
return contact?.last_seen ? (
|
||||
if (!contact) return null;
|
||||
const parts: string[] = [];
|
||||
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' : ''}`);
|
||||
}
|
||||
return parts.length > 0 ? (
|
||||
<span className="ml-2 font-sans">
|
||||
(Last heard: {formatTime(contact.last_seen)})
|
||||
({parts.join(', ')})
|
||||
</span>
|
||||
) : null;
|
||||
})()}
|
||||
|
||||
Reference in New Issue
Block a user