made arguments string
This commit is contained in:
parent
edf6cfa453
commit
71e1be333a
@ -52,11 +52,11 @@ function TerminalComponent (p: {websocket: string|null}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
socket.addEventListener('open', () => {
|
socket.addEventListener('open', () => {
|
||||||
socket.send(JSON.stringify({CommandType: 'resize', Arguments: [terminal.current?.rows, terminal.current?.cols]}));
|
socket.send(JSON.stringify({CommandType: 'resize', Arguments: `${terminal.current?.rows}x${terminal.current?.cols}`}));
|
||||||
});
|
});
|
||||||
|
|
||||||
terminal.current.onResize(({cols, rows})=>{
|
terminal.current.onResize(({cols, rows})=>{
|
||||||
socket.send(JSON.stringify({CommandType: 'resize', Arguments: [rows, cols]}));
|
socket.send(JSON.stringify({CommandType: 'resize', Arguments: `${rows}x${cols}`}));
|
||||||
})
|
})
|
||||||
|
|
||||||
socket.addEventListener('message', (event) => {
|
socket.addEventListener('message', (event) => {
|
||||||
@ -64,7 +64,7 @@ function TerminalComponent (p: {websocket: string|null}) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
terminal.current.onData((data) => {
|
terminal.current.onData((data) => {
|
||||||
socket.send(JSON.stringify({CommandType: 'insert', Arguments: [data]}));
|
socket.send(JSON.stringify({CommandType: 'insert', Arguments: data}));
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user