From b22b565947ac49406664de06350e5cbdbc856435 Mon Sep 17 00:00:00 2001 From: Mihai Parparita Date: Mon, 12 Sep 2022 16:00:35 -0700 Subject: [PATCH] cmd/tsconnect: allow xterm.js terminal options to be passed in Allows clients to use a custom theme and other xterm.js customization options. Fixes #5610 Signed-off-by: Mihai Parparita --- cmd/tsconnect/src/lib/ssh.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/tsconnect/src/lib/ssh.ts b/cmd/tsconnect/src/lib/ssh.ts index 4b23db7b2..f6dc62aac 100644 --- a/cmd/tsconnect/src/lib/ssh.ts +++ b/cmd/tsconnect/src/lib/ssh.ts @@ -1,4 +1,4 @@ -import { Terminal } from "xterm" +import { Terminal, ITerminalOptions } from "xterm" import { FitAddon } from "xterm-addon-fit" import { WebLinksAddon } from "xterm-addon-web-links" @@ -11,11 +11,13 @@ export function runSSHSession( termContainerNode: HTMLDivElement, def: SSHSessionDef, ipn: IPN, - onDone: () => void + onDone: () => void, + terminalOptions?: ITerminalOptions ) { const term = new Terminal({ cursorBlink: true, allowProposedApi: true, + ...terminalOptions, }) const fitAddon = new FitAddon()