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.
This commit is contained in:
Tom Fifield
2024-05-26 14:46:26 +08:00
parent 35f406c225
commit cbb3b63e5c

View File

@@ -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>
])}