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') {