fix(striker-ui): correct VNC key-combo menu colours

main
Tsu-ba-me 1 year ago committed by Yanhao Lei
parent a00a5721d6
commit 0ada0d4292
  1. 32
      striker-ui/components/Display/FullSize.tsx

@ -2,22 +2,14 @@ import {
Close as CloseIcon, Close as CloseIcon,
Keyboard as KeyboardIcon, Keyboard as KeyboardIcon,
} from '@mui/icons-material'; } from '@mui/icons-material';
import { import { Box, IconButtonProps, Menu, styled, Typography } from '@mui/material';
Box,
IconButtonProps,
Menu,
MenuItem,
styled,
Typography,
} from '@mui/material';
import RFB from '@novnc/novnc/core/rfb'; import RFB from '@novnc/novnc/core/rfb';
import dynamic from 'next/dynamic'; import dynamic from 'next/dynamic';
import { useState, useEffect, FC, useMemo, useRef, useCallback } from 'react'; import { useState, useEffect, FC, useMemo, useRef, useCallback } from 'react';
import { TEXT } from '../../lib/consts/DEFAULT_THEME';
import IconButton from '../IconButton'; import IconButton from '../IconButton';
import keyCombinations from './keyCombinations'; import keyCombinations from './keyCombinations';
import MenuItem from '../MenuItem';
import { Panel, PanelHeader } from '../Panels'; import { Panel, PanelHeader } from '../Panels';
import Spinner from '../Spinner'; import Spinner from '../Spinner';
import { HeaderText } from '../Text'; import { HeaderText } from '../Text';
@ -28,8 +20,6 @@ const PREFIX = 'FullSize';
const classes = { const classes = {
displayBox: `${PREFIX}-displayBox`, displayBox: `${PREFIX}-displayBox`,
spinnerBox: `${PREFIX}-spinnerBox`, spinnerBox: `${PREFIX}-spinnerBox`,
buttonsBox: `${PREFIX}-buttonsBox`,
keysItem: `${PREFIX}-keysItem`,
}; };
const StyledDiv = styled('div')(() => ({ const StyledDiv = styled('div')(() => ({
@ -45,18 +35,6 @@ const StyledDiv = styled('div')(() => ({
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
}, },
[`& .${classes.buttonsBox}`]: {
paddingTop: 0,
},
[`& .${classes.keysItem}`]: {
backgroundColor: TEXT,
paddingRight: '3em',
'&:hover': {
backgroundColor: TEXT,
},
},
})); }));
const VncDisplay = dynamic(() => import('./VncDisplay'), { ssr: false }); const VncDisplay = dynamic(() => import('./VncDisplay'), { ssr: false });
@ -201,11 +179,7 @@ const FullSize: FC<FullSizeProps> = ({
onClose={() => setAnchorEl(null)} onClose={() => setAnchorEl(null)}
> >
{keyCombinations.map(({ keys, scans }) => ( {keyCombinations.map(({ keys, scans }) => (
<MenuItem <MenuItem key={keys} onClick={() => handleSendKeys(scans)}>
onClick={() => handleSendKeys(scans)}
className={classes.keysItem}
key={keys}
>
<Typography variant="subtitle1">{keys}</Typography> <Typography variant="subtitle1">{keys}</Typography>
</MenuItem> </MenuItem>
))} ))}

Loading…
Cancel
Save