From 38b77c77bbf29f260fb2a661676d88f0eb48baef Mon Sep 17 00:00:00 2001 From: vapao Date: Thu, 9 Dec 2021 19:45:48 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E4=BC=98=E5=8C=96=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/components/ACEditor.js | 6 +++++- spug_web/src/index.css | 9 +++++++-- spug_web/src/pages/config/setting/JSONView.js | 8 ++------ spug_web/src/pages/config/setting/TextView.js | 15 +++++++-------- spug_web/src/pages/deploy/app/Ext1Setup2.js | 13 ++++++------- spug_web/src/pages/deploy/app/Ext1Setup3.js | 13 +++++-------- spug_web/src/pages/deploy/app/Ext2Setup2.js | 10 ++++------ spug_web/src/pages/deploy/request/BatchDelete.js | 6 +++--- spug_web/src/pages/host/BatchSync.js | 2 +- spug_web/src/pages/host/Form.js | 2 +- spug_web/src/pages/host/Import.js | 2 +- spug_web/src/pages/monitor/Step1.js | 2 +- spug_web/src/pages/monitor/Step2.js | 2 +- spug_web/src/pages/schedule/Step3.js | 6 +++--- spug_web/src/pages/system/account/Form.js | 4 ++-- spug_web/src/pages/system/role/HostPerm.js | 4 ++-- spug_web/src/pages/system/setting/AlarmSetting.js | 2 +- spug_web/src/pages/system/setting/BasicSetting.js | 2 +- spug_web/src/pages/system/setting/KeySetting.js | 4 ++-- spug_web/src/pages/system/setting/OpenService.js | 2 +- .../src/pages/system/setting/SecuritySetting.js | 4 ++-- 21 files changed, 58 insertions(+), 60 deletions(-) diff --git a/spug_web/src/components/ACEditor.js b/spug_web/src/components/ACEditor.js index 4a3da2d..40ec4d5 100644 --- a/spug_web/src/components/ACEditor.js +++ b/spug_web/src/components/ACEditor.js @@ -6,17 +6,21 @@ import React from 'react'; import Editor from 'react-ace'; import 'ace-builds/src-noconflict/mode-sh'; +import 'ace-builds/src-noconflict/mode-text'; +import 'ace-builds/src-noconflict/mode-json'; +import 'ace-builds/src-noconflict/mode-space'; import 'ace-builds/src-noconflict/mode-python'; import 'ace-builds/src-noconflict/theme-tomorrow'; export default function (props) { + const style = {fontFamily: 'source-code-pro, Menlo, Monaco, Consolas, PingFang SC, Microsoft YaHei', ...props.style} return ( ) } diff --git a/spug_web/src/index.css b/spug_web/src/index.css index 1847b84..55b385e 100644 --- a/spug_web/src/index.css +++ b/spug_web/src/index.css @@ -2,7 +2,7 @@ body { margin: 0; - font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif; + font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, Microsoft YaHei, PingFang SC, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow: hidden; @@ -18,7 +18,12 @@ div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { } code { - font-family: source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace, PingFang SC, Microsoft YaHei; + font-family: source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace, Microsoft YaHei, PingFang SC; +} + +.ant-form-item-extra { + font-size: 13px; + padding-top: 6px; } /* Common CSS style */ diff --git a/spug_web/src/pages/config/setting/JSONView.js b/spug_web/src/pages/config/setting/JSONView.js index ea1f0ea..7ef909e 100644 --- a/spug_web/src/pages/config/setting/JSONView.js +++ b/spug_web/src/pages/config/setting/JSONView.js @@ -7,10 +7,7 @@ import React from 'react'; import { observer } from 'mobx-react'; import { SaveOutlined, EditOutlined } from '@ant-design/icons'; import { Button, message } from 'antd'; -import Editor from 'react-ace'; -import 'ace-builds/src-noconflict/mode-json'; -import 'ace-builds/src-noconflict/theme-tomorrow'; -import { AuthButton } from 'components'; +import { AuthButton, ACEditor } from 'components'; import { http } from 'libs'; import store from './store'; @@ -57,14 +54,13 @@ class JSONView extends React.Component { const {body, readOnly, loading} = this.state; return (
- this.setState({body: v})}/> {readOnly && - this.setState({body: v})}/> diff --git a/spug_web/src/pages/deploy/app/Ext1Setup2.js b/spug_web/src/pages/deploy/app/Ext1Setup2.js index 3ab6ce9..31ae24f 100644 --- a/spug_web/src/pages/deploy/app/Ext1Setup2.js +++ b/spug_web/src/pages/deploy/app/Ext1Setup2.js @@ -7,8 +7,8 @@ import React from 'react'; import { observer } from 'mobx-react'; import { QuestionCircleOutlined } from '@ant-design/icons'; import { Form, Radio, Button, Tooltip } from 'antd'; +import { ACEditor } from 'components'; import { cleanCommand } from 'libs'; -import Editor from 'react-ace'; import 'ace-builds/src-noconflict/mode-text'; import 'ace-builds/src-noconflict/mode-sh'; import 'ace-builds/src-noconflict/theme-tomorrow'; @@ -46,10 +46,9 @@ export default observer(function () { return (
- {Tips},请避免在此修改已跟踪的文件,防止在检出代码时失败。}> - {Tips},请避免在此修改已跟踪的文件,防止在检出代码时失败。}> + {Tips},大多数情况下在此进行构建操作。}> - {Tips},大多数情况下在此进行构建操作。}> + {Tips},此时还未进行文件变更,可进行一些发布前置操作。}> - {Tips},此时还未进行文件变更,可进行一些发布前置操作。}> + {Tips},可以在发布后进行重启服务等操作。}> - {Tips},可以在发布后进行重启服务等操作。}> + - , [undefined, '0'].includes(item['src_mode']) ? ( - + ]) : ( - 将删除截止日期之前的所有发布申请记录。
}> + extra={
将删除截止日期之前的所有发布申请记录。
}> )} {mode === 'count' && ( - + setValue(e.target.value)} placeholder="请输入保留个数"/> )} {mode === 'deploy' && ( - + store.record.extra = e.target.value}/> - + store.record.extra = e.target.value}/> - + } value={lds.get(args, 'cron.rule')} placeholder="例如每天凌晨1点执行:0 1 * * *" onChange={e => handleCronArgs('rule', e.target.value)}/> - + handleCronArgs('start', v)}/> - +