mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-12-15 16:46:24 +00:00
Update AppImage
This commit is contained in:
@@ -325,6 +325,12 @@ export const TerminalPanel: React.FC<TerminalPanelProps> = ({ websocketUrl, onCl
|
|||||||
if (xtermViewport) xtermViewport.style.padding = "0"
|
if (xtermViewport) xtermViewport.style.padding = "0"
|
||||||
if (xtermScreen) xtermScreen.style.padding = "0"
|
if (xtermScreen) xtermScreen.style.padding = "0"
|
||||||
fitAddon.fit()
|
fitAddon.fit()
|
||||||
|
|
||||||
|
const cols = term.cols
|
||||||
|
const rows = term.rows
|
||||||
|
if (ws.readyState === WebSocket.OPEN) {
|
||||||
|
ws.send(`\x1b[8;${rows};${cols}t`)
|
||||||
|
}
|
||||||
}, 10)
|
}, 10)
|
||||||
|
|
||||||
const wsUrl = websocketUrl || getWebSocketUrl()
|
const wsUrl = websocketUrl || getWebSocketUrl()
|
||||||
@@ -359,6 +365,11 @@ export const TerminalPanel: React.FC<TerminalPanelProps> = ({ websocketUrl, onCl
|
|||||||
const handleResize = () => {
|
const handleResize = () => {
|
||||||
try {
|
try {
|
||||||
fitAddon.fit()
|
fitAddon.fit()
|
||||||
|
const cols = term.cols
|
||||||
|
const rows = term.rows
|
||||||
|
if (ws.readyState === WebSocket.OPEN) {
|
||||||
|
ws.send(`\x1b[8;${rows};${cols}t`)
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
// Ignore resize errors
|
// Ignore resize errors
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,16 +169,19 @@ def terminal_websocket(ws):
|
|||||||
# Client closed connection
|
# Client closed connection
|
||||||
break
|
break
|
||||||
|
|
||||||
# Handle terminal resize (optional)
|
|
||||||
if data.startswith('\x1b[8;'):
|
if data.startswith('\x1b[8;'):
|
||||||
try:
|
try:
|
||||||
|
# Parse: \x1b[8;{rows};{cols}t
|
||||||
parts = data[4:-1].split(';')
|
parts = data[4:-1].split(';')
|
||||||
rows, cols = int(parts[0]), int(parts[1])
|
if len(parts) >= 2:
|
||||||
set_winsize(master_fd, rows, cols)
|
rows, cols = int(parts[0]), int(parts[1])
|
||||||
|
set_winsize(master_fd, rows, cols)
|
||||||
|
print(f"[Terminal] Resized to {rows}x{cols}")
|
||||||
continue
|
continue
|
||||||
except:
|
except Exception as e:
|
||||||
|
print(f"Error parsing resize: {e}")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Send input to bash
|
# Send input to bash
|
||||||
try:
|
try:
|
||||||
os.write(master_fd, data.encode('utf-8'))
|
os.write(master_fd, data.encode('utf-8'))
|
||||||
|
|||||||
Reference in New Issue
Block a user