feat(ConnectionTestResults): [closes #124] explain connection types

This commit is contained in:
Jeremy Kahn 2023-06-17 14:51:54 -05:00
parent 6c5c4129f1
commit ec9c9f61ce

View File

@ -1,4 +1,4 @@
import { Typography } from '@mui/material' import { Tooltip, Typography } from '@mui/material'
import Circle from '@mui/icons-material/FiberManualRecord' import Circle from '@mui/icons-material/FiberManualRecord'
import { ConnectionTestResults as IConnectionTestResults } from './useConnectionTest' import { ConnectionTestResults as IConnectionTestResults } from './useConnectionTest'
@ -11,6 +11,7 @@ export const ConnectionTestResults = ({
}: ConnectionTestResultsProps) => { }: ConnectionTestResultsProps) => {
if (hasHost && hasRelay) { if (hasHost && hasRelay) {
return ( return (
<Tooltip title="Connections can be established with all peers that also have a full network connection.">
<Typography variant="subtitle2"> <Typography variant="subtitle2">
<Typography <Typography
component="span" component="span"
@ -20,9 +21,11 @@ export const ConnectionTestResults = ({
</Typography>{' '} </Typography>{' '}
Full network connection Full network connection
</Typography> </Typography>
</Tooltip>
) )
} else if (hasHost) { } else if (hasHost) {
return ( return (
<Tooltip title="Relay server is unavailable. Connections can only be established when a relay server is not needed for either peer.">
<Typography variant="subtitle2"> <Typography variant="subtitle2">
<Typography <Typography
component="span" component="span"
@ -32,9 +35,11 @@ export const ConnectionTestResults = ({
</Typography>{' '} </Typography>{' '}
Partial network connection Partial network connection
</Typography> </Typography>
</Tooltip>
) )
} else { } else {
return ( return (
<Tooltip title="Pairing server is unavailable. Peer connections cannot be established.">
<Typography variant="subtitle2"> <Typography variant="subtitle2">
<Typography <Typography
component="span" component="span"
@ -44,6 +49,7 @@ export const ConnectionTestResults = ({
</Typography>{' '} </Typography>{' '}
No network connection No network connection
</Typography> </Typography>
</Tooltip>
) )
} }
} }