diff --git a/striker-ui/components/Display/FullSize.tsx b/striker-ui/components/Display/FullSize.tsx index 0f0dd38a..e3b8f8fa 100644 --- a/striker-ui/components/Display/FullSize.tsx +++ b/striker-ui/components/Display/FullSize.tsx @@ -12,6 +12,7 @@ import IconButton from '../IconButton'; import keyCombinations from './keyCombinations'; import MenuItem from '../MenuItem'; import { Panel, PanelHeader } from '../Panels'; +import ServerMenu from '../ServerMenu'; import Spinner from '../Spinner'; import { HeaderText } from '../Text'; import useIsFirstRender from '../../hooks/useIsFirstRender'; @@ -215,11 +216,23 @@ const FullSize: FC = ({ showScreen && ( <> {keyboardMenuElement} + {returnHomeElement} {vncDisconnectElement} ), - [keyboardMenuElement, returnHomeElement, showScreen, vncDisconnectElement], + [ + keyboardMenuElement, + returnHomeElement, + serverName, + serverUUID, + showScreen, + vncDisconnectElement, + ], ); useEffect(() => { diff --git a/striker-ui/components/Display/Preview.tsx b/striker-ui/components/Display/Preview.tsx index 8c5b1dc8..0787a6b8 100644 --- a/striker-ui/components/Display/Preview.tsx +++ b/striker-ui/components/Display/Preview.tsx @@ -19,6 +19,7 @@ import api from '../../lib/api'; import FlexBox from '../FlexBox'; import IconButton, { IconButtonProps } from '../IconButton'; import { InnerPanel, InnerPanelHeader, Panel, PanelHeader } from '../Panels'; +import ServerMenu from '../ServerMenu'; import Spinner from '../Spinner'; import { BodyText, HeaderText } from '../Text'; import { elapsed, last, now } from '../../lib/time'; @@ -105,7 +106,7 @@ const Preview: FC = ({ isShowControls = PREVIEW_DEFAULT_PROPS.isShowControls, isUseInnerPanel = PREVIEW_DEFAULT_PROPS.isUseInnerPanel, onClickPreview: previewClickHandler, - serverName, + serverName = PREVIEW_DEFAULT_PROPS.serverName, serverState = PREVIEW_DEFAULT_PROPS.serverState, serverUUID, onClickConnectButton: connectButtonClickHandle = previewClickHandler, @@ -239,12 +240,18 @@ const Preview: FC = ({ {headerEndAdornment} + :first-child': { flexGrow: 1 } }}> {/* Box wrapper below is required to keep external preview size sane. */} {iconButton} {isShowControls && preview && ( - + diff --git a/striker-ui/pages/index.tsx b/striker-ui/pages/index.tsx index dceb1c32..3b727915 100644 --- a/striker-ui/pages/index.tsx +++ b/striker-ui/pages/index.tsx @@ -16,7 +16,6 @@ import OutlinedInput from '../components/OutlinedInput'; import { Panel, PanelHeader } from '../components/Panels'; import periodicFetch from '../lib/fetchers/periodicFetch'; import ProvisionServerDialog from '../components/ProvisionServerDialog'; -import ServerMenu from '../components/ServerMenu'; import Spinner from '../components/Spinner'; import { HeaderText } from '../components/Text'; import { last } from '../lib/time'; @@ -80,13 +79,6 @@ const createServerPreviewContainer = (servers: ServerListItem[]) => ( > {anvilName} , - , ]} hrefPreview={`/server?uuid=${serverUUID}&server_name=${serverName}&server_state=${serverState}&vnc=1`} isExternalLoading={loading}