Add settings page with change password, fix terminal ws bug
Deploy Dashboard / deploy (push) Failing after 2m5s

This commit is contained in:
Gan, Jimmy
2026-02-19 17:29:03 +08:00
parent 4036292273
commit bf49e13e56
8 changed files with 240 additions and 14 deletions
+3 -3
View File
@@ -16,7 +16,7 @@ async def ws_endpoint(websocket: WebSocket, user: str = Depends(auth.get_current
return
await ws.accept()
await websocket.accept()
master_fd, slave_fd = pty.openpty()
pid = os.fork()
@@ -40,7 +40,7 @@ async def ws_endpoint(websocket: WebSocket, user: str = Depends(auth.get_current
data = os.read(master_fd, 4096)
if not data:
break
await ws.send_bytes(data)
await websocket.send_bytes(data)
except (OSError, WebSocketDisconnect):
pass
@@ -53,7 +53,7 @@ async def ws_endpoint(websocket: WebSocket, user: str = Depends(auth.get_current
try:
while True:
msg = await ws.receive()
msg = await websocket.receive()
if "bytes" in msg and msg["bytes"]:
data = msg["bytes"]
# Handle resize: first byte 0x01 means resize message