From a5a5970001d3b44658b6749a11ca997c6ed68c4f Mon Sep 17 00:00:00 2001 From: vapao Date: Mon, 4 Jul 2022 10:36:57 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E6=96=87=E4=BB=B6=E5=88=86=E5=8F=91?= =?UTF-8?q?=E5=92=8C=E6=89=B9=E9=87=8F=E6=89=A7=E8=A1=8C=E9=80=82=E9=85=8D?= =?UTF-8?q?=E7=BB=88=E7=AB=AF=E4=B8=BB=E9=A2=98=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/pages/exec/task/Output.js | 4 +++- spug_web/src/pages/exec/transfer/Output.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/spug_web/src/pages/exec/task/Output.js b/spug_web/src/pages/exec/task/Output.js index 5f09d93..0559b59 100644 --- a/spug_web/src/pages/exec/task/Output.js +++ b/spug_web/src/pages/exec/task/Output.js @@ -18,6 +18,7 @@ import { Terminal } from 'xterm'; import style from './index.module.less'; import { X_TOKEN } from 'libs'; import store from './store'; +import gStore from 'gStore'; let gCurrent; @@ -31,7 +32,8 @@ function OutView(props) { store.tag = '' gCurrent = current term.setOption('disableStdin', true) - term.setOption('fontFamily', 'Source Code Pro, Courier New, Courier, Monaco, monospace, PingFang SC, Microsoft YaHei') + term.setOption('fontSize', gStore.terminal.fontSize) + term.setOption('fontFamily', gStore.terminal.fontFamily) term.setOption('theme', {background: '#2b2b2b', foreground: '#A9B7C6', cursor: '#2b2b2b'}) term.attachCustomKeyEventHandler((arg) => { if (arg.ctrlKey && arg.code === 'KeyC' && arg.type === 'keydown') { diff --git a/spug_web/src/pages/exec/transfer/Output.js b/spug_web/src/pages/exec/transfer/Output.js index 08f05e6..e4262bb 100644 --- a/spug_web/src/pages/exec/transfer/Output.js +++ b/spug_web/src/pages/exec/transfer/Output.js @@ -18,6 +18,7 @@ import { Terminal } from 'xterm'; import style from './index.module.less'; import { X_TOKEN, http } from 'libs'; import store from './store'; +import gStore from 'gStore'; let gCurrent; @@ -31,7 +32,8 @@ function OutView(props) { store.tag = '' gCurrent = current term.setOption('disableStdin', true) - term.setOption('fontFamily', 'Source Code Pro, Courier New, Courier, Monaco, monospace, PingFang SC, Microsoft YaHei') + term.setOption('fontSize', gStore.terminal.fontSize) + term.setOption('fontFamily', gStore.terminal.fontFamily) term.setOption('theme', {background: '#2b2b2b', foreground: '#A9B7C6', cursor: '#2b2b2b'}) term.attachCustomKeyEventHandler((arg) => { if (arg.ctrlKey && arg.code === 'KeyC' && arg.type === 'keydown') {