tailscale/cmd/tsconnect
Mihai Parparita 9a2171e4ea cmd/tsconnect: make terminal resizable
Makes the terminal container DOM node as large as the window (except for
the header) via flexbox. The xterm.js terminal is then sized to fit via
xterm-addon-fit. Once we have a computed rows/columns size, and we can
tell the SSH session of the computed size.

Required introducing an IPNSSHSession type to allow the JS to control
the SSH session once opened. That alse allows us to programatically
close it, which we do when the user closes the window with the session
still active.

I initially wanted to open the terminal in a new window instead (so that
it could be resizable independently of the main window), but xterm.js
does not appear to work well in that mode (possibly because it adds an
IntersectionObserver to pause rendering when the window is not visible,
and it ends up doing that when the parent window is hidden -- see
xtermjs/xterm.js@87dca56dee)

Fixes #5150

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-08-02 15:30:40 -07:00
..
dist cmd/tsconnect: initial scaffolding for Tailscale Connect browser client 2022-07-19 13:43:08 -07:00
src cmd/tsconnect: make terminal resizable 2022-08-02 15:30:40 -07:00
wasm cmd/tsconnect: make terminal resizable 2022-08-02 15:30:40 -07:00
.gitignore cmd/tsconnect: initial scaffolding for Tailscale Connect browser client 2022-07-19 13:43:08 -07:00
build.go cmd/tsconnect: lint during build step 2022-07-27 16:12:22 -07:00
common.go cmd/tsconnect: lint during build step 2022-07-27 16:12:22 -07:00
dev.go cmd/tsconnect: initial scaffolding for Tailscale Connect browser client 2022-07-19 13:43:08 -07:00
index.html cmd/tsconnect: make terminal resizable 2022-08-02 15:30:40 -07:00
package.json cmd/tsconnect: make terminal resizable 2022-08-02 15:30:40 -07:00
serve.go cmd/tsconnect: switch to TypeScript 2022-07-27 13:50:34 -07:00
tailwind.config.js cmd/tsconnect: add Tailwind CSS support and switch to using it 2022-07-27 14:05:45 -07:00
tsconfig.json cmd/tsconnect: switch to TypeScript 2022-07-27 13:50:34 -07:00
tsconnect.go all: gofmt for Go 1.19 2022-08-02 10:08:05 -07:00
yarn.lock cmd/tsconnect: make terminal resizable 2022-08-02 15:30:40 -07:00