Skip to content

Commit

Permalink
bumped xterm.js and plugins, horizonal scrollbar issue needs to be ch…
Browse files Browse the repository at this point in the history
…ecked
  • Loading branch information
srieger1 committed Jan 26, 2024
1 parent d857730 commit fd38a2c
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 67 deletions.
9 changes: 4 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"@types/react": "^18.0.9",
"@types/react-dom": "^18.0.4",
"@types/react-router-dom": "^5.3.3",
"do_username": "^0.0.2",
"fontsource-roboto": "^4.0.0",
"guacamole-common-js": "^1.4.0-a",
"mermaid": "^9.4.0",
Expand All @@ -36,10 +35,10 @@
"typescript": "^4.7.4",
"vscode-ws-jsonrpc": "^1.0.2",
"web-vitals": "^2.1.4",
"xterm": "^4.18.0",
"xterm-addon-attach": "^0.6.0",
"xterm-addon-fit": "^0.5.0",
"xterm-addon-serialize": "^0.6.2"
"xterm": "^5.3.0",
"xterm-addon-attach": "^0.9.0",
"xterm-addon-fit": "^0.8.0",
"xterm-addon-serialize": "^0.11.0"
},
"devDependencies": {
"@svgr/webpack": "^6.2.1",
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Terminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ export default class XTerminal extends React.Component<TerminalProps> {
this.websocket.send(`auth ${localStorage.getItem("token")}`);
//signal initial window resize to ssh using SIGWINCH (\x1B[8;25;80t)
//running "resize" manually in the shell also fixes ncurses, tmux, screen etc. dimensions
this.websocket.send("\x1B[8;"+this.fitAddon.proposeDimensions().rows+";"+this.fitAddon.proposeDimensions().cols+"t");
this.websocket.send("\x1B[8;"+this.fitAddon.proposeDimensions()?.rows+";"+this.fitAddon.proposeDimensions()?.cols+"t");
}
this.xterm?.terminal.onResize((size) => {
this.fitAddon.fit();
if (this.websocket?.readyState === 1) {
//signal window resize to ssh using SIGWINCH (\x1B[8;25;80t)
//running "resize" manually in the shell also fixes ncurses, tmux, screen etc. dimensions
this.websocket?.send("\x1B[8;"+this.fitAddon.proposeDimensions().rows+";"+this.fitAddon.proposeDimensions().cols+"t");
this.websocket?.send("\x1B[8;"+this.fitAddon.proposeDimensions()?.rows+";"+this.fitAddon.proposeDimensions()?.cols+"t");
}
})
this.xterm?.terminal.write( this.props?.terminalState ?? "" );
Expand Down
120 changes: 60 additions & 60 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fd38a2c

Please sign in to comment.