style(front-end): display message while the front-end fetches vnc connection configs

main
Josue 3 years ago
parent 9d9be36447
commit ae628edb24
  1. 18
      striker-ui/components/Display/FullSize.tsx

@ -17,12 +17,13 @@ const useStyles = makeStyles(() => ({
displayBox: { displayBox: {
paddingTop: '1em', paddingTop: '1em',
paddingBottom: 0, paddingBottom: 0,
width: '75%',
height: '80%',
}, },
vncBox: { spinnerBox: {
width: '75%', flexDirection: 'column',
height: '80%', width: '75vw',
height: '75vh',
alignItems: 'center',
justifyContent: 'center',
}, },
closeButton: { closeButton: {
borderRadius: 8, borderRadius: 8,
@ -134,7 +135,7 @@ const FullSize = ({ setMode, uuid, serverName }: PreviewProps): JSX.Element => {
<Box display="flex" className={classes.displayBox}> <Box display="flex" className={classes.displayBox}>
{vncConnection ? ( {vncConnection ? (
<Box className={classes.vncBox}> <Box>
<VncDisplay <VncDisplay
rfb={rfb} rfb={rfb}
url={`${vncConnection.protocol}://${hostname.current}:${vncConnection.forward_port}`} url={`${vncConnection.protocol}://${hostname.current}:${vncConnection.forward_port}`}
@ -142,7 +143,10 @@ const FullSize = ({ setMode, uuid, serverName }: PreviewProps): JSX.Element => {
/> />
</Box> </Box>
) : ( ) : (
<Spinner /> <Box display="flex" className={classes.spinnerBox}>
<HeaderText text={`Establishing connection with ${serverName}`} />
<Spinner />
</Box>
)} )}
<Box> <Box>
<Box className={classes.closeBox}> <Box className={classes.closeBox}>

Loading…
Cancel
Save