Merge branch 'dev' of ssh://git.commumedia.org:2222/alex/headquarter into dev
This commit is contained in:
@@ -290,6 +290,16 @@ export const TerminalComponent: React.FC<TerminalProps> = ({
|
|||||||
if (termRef.current && fitAddonRef.current) {
|
if (termRef.current && fitAddonRef.current) {
|
||||||
try {
|
try {
|
||||||
fitAddonRef.current.fit();
|
fitAddonRef.current.fit();
|
||||||
|
const { cols, rows } = termRef.current;
|
||||||
|
if (wsRef.current?.readyState === WebSocket.OPEN) {
|
||||||
|
wsRef.current.send(
|
||||||
|
JSON.stringify({
|
||||||
|
type: "resize",
|
||||||
|
cols,
|
||||||
|
rows,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
// Ignore fit errors during re-initialization
|
// Ignore fit errors during re-initialization
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user