This commit is contained in:
2024-06-02 16:59:05 +03:00
parent 03ed3eefd5
commit b4e3a3b82d
3 changed files with 17 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
// src/components/Terminal.tsx
import React, { useEffect, useRef } from 'react';
import NewWindow from 'react-new-window';
import { Terminal } from 'xterm';
import { FitAddon } from 'xterm-addon-fit';
import 'xterm/css/xterm.css';
@@ -77,7 +78,7 @@ function TerminalComponent (p: {websocket: string|null}) {
useTerminalResize(terminalRef, fitAddon.current!)
return <div ref={terminalRef} style={{ width: '100%', height: '100%' }}></div>;
return <NewWindow><div ref={terminalRef} style={{ width: '100%', height: '100%' }}></div></NewWindow>
};
export default TerminalComponent;