Add ErrorText to syncer.

This commit is contained in:
Gucheng Wang
2022-01-17 21:16:32 +08:00
parent d9bcce9485
commit 9fd175eefd
11 changed files with 87 additions and 20 deletions

View File

@ -21,6 +21,11 @@ import * as Setting from "./Setting";
import i18next from "i18next";
import SyncerTableColumnTable from "./SyncerTableColumnTable";
import {Controlled as CodeMirror} from 'react-codemirror2';
import "codemirror/lib/codemirror.css";
require('codemirror/theme/material-darker.css');
require("codemirror/mode/javascript/javascript");
const { Option } = Select;
class SyncerEditPage extends React.Component {
@ -248,6 +253,22 @@ class SyncerEditPage extends React.Component {
}} />
</Col>
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("syncer:Error text"), i18next.t("syncer:Error text - Tooltip"))} :
</Col>
<Col span={22} >
<div style={{width: "100%", height: "300px"}} >
<CodeMirror
value={this.state.syncer.errorText}
options={{mode: 'javascript', theme: "material-darker"}}
onBeforeChange={(editor, data, value) => {
this.updateSyncerField("errorText", value);
}}
/>
</div>
</Col>
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 19 : 2}>
{Setting.getLabel(i18next.t("general:Is enabled"), i18next.t("general:Is enabled - Tooltip"))} :