🚸 优化 Terminal 连接健壮性、输入缓存

This commit is contained in:
naiba
2021-08-19 10:21:54 +08:00
parent 1f0791fc0e
commit 77a89f62cd
2 changed files with 65 additions and 18 deletions

View File

@@ -48,6 +48,11 @@
onResize()
}
socket.onclose = () => {
alert('Terminal 连接超时或会话已结束')
window.close()
}
socket.onerror = () => {
alert('Terminal 连接失败,请检查 /terminal/* 的 WebSocket 反代情况')
}