test
This commit is contained in:
parent
f93e079303
commit
85dd0a038f
@ -270,29 +270,9 @@ export function ActionItem(p: { action: ActionInfo, identifierSubstring?: string
|
|||||||
if (terminalWindow) {
|
if (terminalWindow) {
|
||||||
terminalWindow.document.write('<div id="terminal-root" style="width:100%; height:100%"/>');
|
terminalWindow.document.write('<div id="terminal-root" style="width:100%; height:100%"/>');
|
||||||
terminalWindow.document.title = "Terminal";
|
terminalWindow.document.title = "Terminal";
|
||||||
|
|
||||||
var terminal_root = terminalWindow.document.getElementById('terminal-root')!
|
|
||||||
|
|
||||||
createRoot(terminal_root!).render(<TerminalComponent websocket={websocketUrl} />);
|
createRoot(terminalWindow.document.body).render(<TerminalComponent websocket={websocketUrl} />);
|
||||||
|
|
||||||
const style = terminalWindow.document.createElement('style');
|
|
||||||
style.innerHTML = `
|
|
||||||
html, body {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
terminalWindow.document.head.appendChild(style);
|
|
||||||
|
|
||||||
// Fit the terminal to the new window
|
|
||||||
terminal_root.style.width = '100%';
|
|
||||||
terminal_root.style.height = '100%';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user