|
|
@ -10,6 +10,7 @@ import { Panel } from '../Panels'; |
|
|
|
import { BLACK, RED, TEXT } from '../../lib/consts/DEFAULT_THEME'; |
|
|
|
import { BLACK, RED, TEXT } from '../../lib/consts/DEFAULT_THEME'; |
|
|
|
import keyCombinations from './keyCombinations'; |
|
|
|
import keyCombinations from './keyCombinations'; |
|
|
|
import putJSON from '../../lib/fetchers/putJSON'; |
|
|
|
import putJSON from '../../lib/fetchers/putJSON'; |
|
|
|
|
|
|
|
import { HeaderText } from '../Text'; |
|
|
|
|
|
|
|
|
|
|
|
const useStyles = makeStyles(() => ({ |
|
|
|
const useStyles = makeStyles(() => ({ |
|
|
|
displayBox: { |
|
|
|
displayBox: { |
|
|
@ -50,6 +51,7 @@ const useStyles = makeStyles(() => ({ |
|
|
|
interface PreviewProps { |
|
|
|
interface PreviewProps { |
|
|
|
setMode: Dispatch<SetStateAction<boolean>>; |
|
|
|
setMode: Dispatch<SetStateAction<boolean>>; |
|
|
|
uuid: string; |
|
|
|
uuid: string; |
|
|
|
|
|
|
|
serverName: string | string[] | undefined; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
interface VncConnectionProps { |
|
|
|
interface VncConnectionProps { |
|
|
@ -69,7 +71,7 @@ const extractDomain = (url: string | undefined): string | undefined => { |
|
|
|
return domain; |
|
|
|
return domain; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const FullSize = ({ setMode, uuid }: PreviewProps): JSX.Element => { |
|
|
|
const FullSize = ({ setMode, uuid, serverName }: PreviewProps): JSX.Element => { |
|
|
|
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null); |
|
|
|
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null); |
|
|
|
const rfb = useRef<typeof RFB>(undefined); |
|
|
|
const rfb = useRef<typeof RFB>(undefined); |
|
|
|
const [vncConnection, setVncConnection] = useState< |
|
|
|
const [vncConnection, setVncConnection] = useState< |
|
|
@ -128,6 +130,10 @@ const FullSize = ({ setMode, uuid }: PreviewProps): JSX.Element => { |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Panel> |
|
|
|
<Panel> |
|
|
|
|
|
|
|
<Box flexGrow={1}> |
|
|
|
|
|
|
|
<HeaderText text={`Server: ${serverName}`} /> |
|
|
|
|
|
|
|
</Box> |
|
|
|
|
|
|
|
|
|
|
|
<Box display="flex" className={classes.displayBox}> |
|
|
|
<Box display="flex" className={classes.displayBox}> |
|
|
|
{vncConnection && extractedDomain && ( |
|
|
|
{vncConnection && extractedDomain && ( |
|
|
|
<Box> |
|
|
|
<Box> |
|
|
|