Browse Source

Mark never heard nodes as '-' in connection info

Nodes never heard before show hop count of 0, and not via MQTT.
However, reality is we've never connected to them. So, mark them as
'-' in the Connection Info column in the nodes table.
pull/210/head
Tom Fifield 2 years ago
parent
commit
cbb3b63e5c
  1. 5
      src/pages/Nodes.tsx

5
src/pages/Nodes.tsx

@ -57,7 +57,10 @@ export const NodesPage = (): JSX.Element => {
{(node.snr + 10) * 5}raw
</Mono>,
<Mono>
{node.viaMqtt === false && node.hopsAway === 0? "Direct": node.hopsAway.toString() + " hops away"}
{node.lastHeard != 0 ?
(node.viaMqtt === false && node.hopsAway === 0
? "Direct": node.hopsAway.toString() + " hops away")
: "-"}
{node.viaMqtt === true? ", via MQTT": ""}
</Mono>
])}

Loading…
Cancel
Save