From a4a48a910865f218c7afa06dc469a595a1d08ad4 Mon Sep 17 00:00:00 2001 From: Cameron Perera Date: Wed, 20 Sep 2023 17:13:12 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20xterm=20csp=20policy=20vi?= =?UTF-8?q?olation=20(#1911)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 🐛 xterm csp policy violation * refactor: 💡 add newline for lint rule --- .../app/components/session/tabs/index.js | 2 + ui/desktop/app/styles/app.scss | 6 +- ui/desktop/package.json | 1 + yarn.lock | 424 +++++++++++++----- 4 files changed, 317 insertions(+), 116 deletions(-) diff --git a/ui/desktop/app/components/session/tabs/index.js b/ui/desktop/app/components/session/tabs/index.js index 2c464f095..5196e3e7f 100644 --- a/ui/desktop/app/components/session/tabs/index.js +++ b/ui/desktop/app/components/session/tabs/index.js @@ -3,6 +3,7 @@ import { action } from '@ember/object'; import { inject as service } from '@ember/service'; import { Terminal } from 'xterm'; import { FitAddon } from 'xterm-addon-fit'; +import { CanvasAddon } from 'xterm-addon-canvas'; import { v4 as uuidv4 } from 'uuid'; import debounce from 'lodash/debounce'; @@ -36,6 +37,7 @@ export default class SessionTerminalTabsComponent extends Component { const termContainer = document.getElementById(`terminal-container`); xterm.loadAddon(fitAddon); + xterm.loadAddon(new CanvasAddon()); xterm.open(termContainer); fitAddon.fit(); xterm.focus(); diff --git a/ui/desktop/app/styles/app.scss b/ui/desktop/app/styles/app.scss index f4fd7d9e8..96b2bf7e9 100644 --- a/ui/desktop/app/styles/app.scss +++ b/ui/desktop/app/styles/app.scss @@ -691,11 +691,11 @@ $chevron-down: url("data:image/svg+xml;utf-8,