From 7d6bc9aaaff2f944dc18e66c74d44655064c488f Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Fri, 22 Mar 2024 23:37:39 -0400 Subject: [PATCH] fix(striker-ui): add button for fullscreen in VNC display controls --- striker-ui/components/Display/FullSize.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/striker-ui/components/Display/FullSize.tsx b/striker-ui/components/Display/FullSize.tsx index e3b8f8fa..53e9179c 100644 --- a/striker-ui/components/Display/FullSize.tsx +++ b/striker-ui/components/Display/FullSize.tsx @@ -1,6 +1,7 @@ import { Close as CloseIcon, Dashboard as DashboardIcon, + Fullscreen as FullscreenIcon, Keyboard as KeyboardIcon, } from '@mui/icons-material'; import { Box, Menu, styled, Typography } from '@mui/material'; @@ -153,6 +154,21 @@ const FullSize: FC = ({ [vncConnecting, vncError], ); + const fullscreenElement = useMemo( + () => ( + + { + rfbScreen.current?.requestFullscreen(); + }} + > + + + + ), + [], + ); + const keyboardMenuElement = useMemo( () => ( @@ -215,6 +231,7 @@ const FullSize: FC = ({ () => showScreen && ( <> + {fullscreenElement} {keyboardMenuElement} = ({ ), [ + fullscreenElement, keyboardMenuElement, returnHomeElement, serverName,