mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +00:00
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 <mihai@tailscale.com>
This commit is contained in:
parent
7c49db02a2
commit
b22b565947
@ -1,4 +1,4 @@
|
|||||||
import { Terminal } from "xterm"
|
import { Terminal, ITerminalOptions } from "xterm"
|
||||||
import { FitAddon } from "xterm-addon-fit"
|
import { FitAddon } from "xterm-addon-fit"
|
||||||
import { WebLinksAddon } from "xterm-addon-web-links"
|
import { WebLinksAddon } from "xterm-addon-web-links"
|
||||||
|
|
||||||
@ -11,11 +11,13 @@ export function runSSHSession(
|
|||||||
termContainerNode: HTMLDivElement,
|
termContainerNode: HTMLDivElement,
|
||||||
def: SSHSessionDef,
|
def: SSHSessionDef,
|
||||||
ipn: IPN,
|
ipn: IPN,
|
||||||
onDone: () => void
|
onDone: () => void,
|
||||||
|
terminalOptions?: ITerminalOptions
|
||||||
) {
|
) {
|
||||||
const term = new Terminal({
|
const term = new Terminal({
|
||||||
cursorBlink: true,
|
cursorBlink: true,
|
||||||
allowProposedApi: true,
|
allowProposedApi: true,
|
||||||
|
...terminalOptions,
|
||||||
})
|
})
|
||||||
|
|
||||||
const fitAddon = new FitAddon()
|
const fitAddon = new FitAddon()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user