mirror of https://github.com/openspug/spug
fix issue
parent
3b8e448a96
commit
edc2328a20
|
@ -27,12 +27,7 @@ function WebSSH(props) {
|
||||||
fitPlugin.fit();
|
fitPlugin.fit();
|
||||||
};
|
};
|
||||||
socket.onclose = e => {
|
socket.onclose = e => {
|
||||||
if (e.code === 3333) {
|
setTimeout(() => term.write('\r\nConnection is closed.\r\n'), 200)
|
||||||
window.location.href = "about:blank";
|
|
||||||
window.close()
|
|
||||||
} else {
|
|
||||||
setTimeout(() => term.write('\r\nConnection is closed.\r\n'), 200)
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
term.onData(data => socket.send(JSON.stringify({data})));
|
term.onData(data => socket.send(JSON.stringify({data})));
|
||||||
term.onResize(({cols, rows}) => socket.send(JSON.stringify({resize: [cols, rows]})));
|
term.onResize(({cols, rows}) => socket.send(JSON.stringify({resize: [cols, rows]})));
|
||||||
|
|
Loading…
Reference in New Issue