From f1b27e85f4220973b21996c2846f2cc3655eeeb1 Mon Sep 17 00:00:00 2001 From: akrike <1625167628@qq.com> Date: Sat, 21 Jun 2025 19:49:45 +0800 Subject: [PATCH] support link closed process --- internal/app/api/ws.go | 2 +- resources/templates/index.html | 2 +- resources/templates/js/{about.bb316073.js => about.eacc2ace.js} | 2 +- resources/templates/js/{app.24a9270b.js => app.cc4acc80.js} | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename resources/templates/js/{about.bb316073.js => about.eacc2ace.js} (65%) rename resources/templates/js/{app.24a9270b.js => app.cc4acc80.js} (99%) diff --git a/internal/app/api/ws.go b/internal/app/api/ws.go index cef4172..04b9354 100644 --- a/internal/app/api/ws.go +++ b/internal/app/api/ws.go @@ -63,7 +63,6 @@ func (w *wsApi) WebsocketHandle(ctx *gin.Context) { log.Logger.Infow("ws连接成功") - proc.SetTerminalSize(utils.GetIntByString(ctx.Query("cols")), utils.GetIntByString(ctx.Query("rows"))) wsCtx, cancel := context.WithCancel(context.Background()) wci := &WsConnetInstance{ WsConnect: conn, @@ -72,6 +71,7 @@ func (w *wsApi) WebsocketHandle(ctx *gin.Context) { } proc.ReadCache(wci) if proc.State.State == 1 { + proc.SetTerminalSize(utils.GetIntByString(ctx.Query("cols")), utils.GetIntByString(ctx.Query("rows"))) w.startWsConnect(wci, cancel, proc, hasOprPermission(ctx, uuid, constants.OPERATION_TERMINAL_WRITE)) proc.AddConn(reqUser, wci) defer proc.DeleteConn(reqUser) diff --git a/resources/templates/index.html b/resources/templates/index.html index b7d76b7..8807833 100644 --- a/resources/templates/index.html +++ b/resources/templates/index.html @@ -1 +1 @@ -