From b90f26d03845c110b1c678645995bc08ca023adb Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sun, 25 Jun 2023 14:45:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=98=BE=E7=A4=BA/=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=86=85=E5=AE=B9=E4=B8=8D=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AppConfig.js | 2 +- src/forge/Main/CoderRootFileDetail.js | 1 + src/forge/Newfile/m_editor.js | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/AppConfig.js b/src/AppConfig.js index 9c5fbfd4..cf7fe8b6 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js index caabe84c..372af720 100644 --- a/src/forge/Main/CoderRootFileDetail.js +++ b/src/forge/Main/CoderRootFileDetail.js @@ -395,6 +395,7 @@ class CoderRootFileDetail extends Component { filepath={`/${detail.path}`} content={detail.content} readOnly={readOnly} + md={md} editorType="update" currentBranch={currentBranch} descName={detail && `Update ${detail.name}`} diff --git a/src/forge/Newfile/m_editor.js b/src/forge/Newfile/m_editor.js index ae2ad19b..0dc3595f 100644 --- a/src/forge/Newfile/m_editor.js +++ b/src/forge/Newfile/m_editor.js @@ -6,6 +6,7 @@ import 'codemirror/mode/clike/clike'; import 'codemirror/mode/css/css'; import UserSubmitComponent from "./UserSubmitComponent"; import CloudIDE from "./cloudIDE"; +import { Base64 } from "js-base64"; import "./index.css"; import "./editor.css"; @@ -34,7 +35,7 @@ class m_editor extends Component { render() { const { editorValue, changeValue } = this.state; - const { readOnly, editorType,onEmpty,filename,empty, currentBranch, descName, checkName, detail, match: { params },filepath,ideTheme } = this.props; + const { readOnly, editorType,onEmpty,filename,empty, currentBranch, descName, checkName, detail, match: { params },filepath, ideTheme , md } = this.props; const editor_options = { lineNumbers: "on", lineWrapping: true, //强制换行 @@ -64,7 +65,7 @@ class m_editor extends Component { {!readOnly ? :