Skip to content

Commit

Permalink
Fixed build issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlabaj committed Jul 19, 2024
1 parent 82c9380 commit fbc1c41
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/module/src/components/SerialConsole/XTerm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,6 @@ export const XTerm: React.FunctionComponent<XTermProps> = ({

// ensure react never reuses this div by keying it with the terminal widget
// Workaround for xtermjs/xterm.js#3172
return <div ref={ref} className={clsx(styles.xterm)} role="list" onFocus={onFocusIn} onBlur={onFocusOut} />;
return <div ref={ref} className={clsx(styles['.xterm'])} role="list" onFocus={onFocusIn} onBlur={onFocusOut} />;
};
XTerm.displayName = 'XTerm';
21 changes: 17 additions & 4 deletions packages/module/src/components/VncConsole/VncConsole.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';

import { css } from '@patternfly/react-styles';
import { Button, EmptyState, Spinner, EmptyStateFooter } from '@patternfly/react-core';

import { initLogging } from '@novnc/novnc/core/util/logging';
Expand All @@ -10,11 +9,24 @@ import RFB from '@novnc/novnc/core/rfb';
import { VncActions } from './VncActions';
import { constants } from '../common/constants';

import styles from '@patternfly/react-styles/css/components/Consoles/VncConsole';
import '@patternfly/react-styles/css/components/Consoles/VncConsole.css';
import clsx from 'clsx';
import { createUseStyles } from 'react-jss';

const { CONNECTED, CONNECTING, DISCONNECTED } = constants;

const useStyles = createUseStyles({
consoleVnc: {
gridArea: 'main'
},
consoleActionsVnc: {
gridArea: 'actions-extra',
display: 'flex',
flexWrap: 'wrap',
justifyContent: 'flex-end',
columnGap: 'var(--pf-v6-global--spacer--sm)'
}
});

export interface VncConsoleProps extends React.HTMLProps<HTMLDivElement> {
/** Children nodes */
children?: React.ReactNode;
Expand Down Expand Up @@ -100,6 +112,7 @@ export const VncConsole: React.FunctionComponent<VncConsoleProps> = ({
}) => {
const rfb = React.useRef<any>();

const styles = useStyles();
const novncElem = React.useRef<HTMLDivElement>(null);
const [status, setStatus] = React.useState(CONNECTING);

Expand Down Expand Up @@ -235,7 +248,7 @@ export const VncConsole: React.FunctionComponent<VncConsoleProps> = ({
return (
<>
{rightContent}
<div className={css(styles.consoleVnc)}>
<div className={clsx(styles.consoleVnc)}>
{children}
<React.Fragment>
<div>
Expand Down

0 comments on commit fbc1c41

Please sign in to comment.