From e45104f12fa217588a053662b68accea7d7f7a80 Mon Sep 17 00:00:00 2001 From: vapao Date: Fri, 1 Apr 2022 10:25:47 +0800 Subject: [PATCH] =?UTF-8?q?A=20web=20terminal=E4=BC=98=E5=8C=96=E9=85=8D?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/pages/ssh/Terminal.js | 1 + spug_web/src/pages/ssh/index.module.less | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/spug_web/src/pages/ssh/Terminal.js b/spug_web/src/pages/ssh/Terminal.js index 0069632..213ba6c 100644 --- a/spug_web/src/pages/ssh/Terminal.js +++ b/spug_web/src/pages/ssh/Terminal.js @@ -19,6 +19,7 @@ function WebSSH(props) { useEffect(() => { term.loadAddon(fitPlugin); term.setOption('fontFamily', 'Source Code Pro, Courier New, Courier, Monaco, monospace, PingFang SC, Microsoft YaHei') + term.setOption('theme', {background: '#2b2b2b', foreground: '#A9B7C6'}) term.open(container.current); term.write('WebSocket connecting ... '); const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:'; diff --git a/spug_web/src/pages/ssh/index.module.less b/spug_web/src/pages/ssh/index.module.less index 670994b..70764e8 100644 --- a/spug_web/src/pages/ssh/index.module.less +++ b/spug_web/src/pages/ssh/index.module.less @@ -73,15 +73,15 @@ .terminal { flex: 1; display: flex; - background-color: #000; + background-color: #2b2b2b; padding-left: 5px; height: calc(100vh - 42px); } .fig { flex: 1; - background-color: #000; - color: #fff; + background-color: #2b2b2b; + color: #A9B7C6; padding-top: 200px; margin-bottom: 0; text-align: center;