From 76a11f0ae18b9c21e4e94cd97c5f929f6cb77688 Mon Sep 17 00:00:00 2001 From: vapao Date: Mon, 4 Jul 2022 01:07:50 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E6=9B=B4=E6=96=B0=E7=BB=88=E7=AB=AF?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E9=85=8D=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/gStore.js | 8 +++++++- spug_web/src/pages/ssh/themes.js | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/spug_web/src/gStore.js b/spug_web/src/gStore.js index cc52340..4b588e8 100644 --- a/spug_web/src/gStore.js +++ b/spug_web/src/gStore.js @@ -19,7 +19,13 @@ class Store { _handleSettings = (res) => { if (res.terminal) { const terminal = JSON.parse(res.terminal) - terminal.styles = themes[terminal.theme] + const styles = themes[terminal.theme] + if (styles) { + terminal.styles = styles + } else { + terminal.styles = themes['dark'] + terminal.theme = 'dark' + } this.terminal = terminal } } diff --git a/spug_web/src/pages/ssh/themes.js b/spug_web/src/pages/ssh/themes.js index c00aa15..c79fd8f 100644 --- a/spug_web/src/pages/ssh/themes.js +++ b/spug_web/src/pages/ssh/themes.js @@ -1,6 +1,6 @@ export default { - solarized_dark: { - foreground: '#839496', background: '#2b2b2b', cursor: '#839496', + gray: { + foreground: '#A9B7C6', background: '#2b2b2b', cursor: '#A9B7C6', black: '#1b1b1b', brightBlack: '#626262',