diff --git a/src/forge/Main/CoderRootDirectory.js b/src/forge/Main/CoderRootDirectory.js index d1daf1dc3..2f0ebf5ba 100644 --- a/src/forge/Main/CoderRootDirectory.js +++ b/src/forge/Main/CoderRootDirectory.js @@ -521,6 +521,7 @@ class CoderRootDirectory extends Component { {...this.state} readOnly={this.state.readOnly} onEdit={this.onEdit} + currentBranch={branch} > )} { diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js index 84065d4cb..218806ba4 100644 --- a/src/forge/Main/CoderRootFileDetail.js +++ b/src/forge/Main/CoderRootFileDetail.js @@ -164,7 +164,8 @@ class CoderRootFileDetail extends Component { current_user, isManager, isDeveloper, - md + md, + currentBranch } = this.props; const { language, languages, description } = this.state; let flag = current_user && current_user.login && (isManager || isDeveloper); @@ -194,12 +195,9 @@ class CoderRootFileDetail extends Component { this.EditFile(false)} className="ml20"> - } - - ) : ( ) : ( - md && readOnly ? - - - - : - - )} + md && readOnly ? + + + + : + + )} ); diff --git a/src/forge/Newfile/UserSubmitComponent.js b/src/forge/Newfile/UserSubmitComponent.js index e2bf44dfc..42e636c19 100644 --- a/src/forge/Newfile/UserSubmitComponent.js +++ b/src/forge/Newfile/UserSubmitComponent.js @@ -115,7 +115,7 @@ class UserSubmitComponent extends Component { const { branch, projectsId , owner } = this.props.match.params; - const { current_user, filepath, projectDetail } = this.props; + const { current_user, filepath, projectDetail , currentBranch } = this.props; const { editor_type } = this.props; return ( @@ -175,7 +175,7 @@ class UserSubmitComponent extends Component { > - 直接提交至{branch}分支 + 直接提交至{currentBranch || branch}分支 diff --git a/src/forge/Newfile/m_editor.js b/src/forge/Newfile/m_editor.js index a2b4216c9..9c43e52e7 100644 --- a/src/forge/Newfile/m_editor.js +++ b/src/forge/Newfile/m_editor.js @@ -20,7 +20,7 @@ class m_editor extends Component { render() { const { editorValue } = this.state; - const { readOnly, editorType, language } = this.props; + const { readOnly, editorType, language , currentBranch } = this.props; const editor_options = { lineNumbers: "on", wordWrap: true, //强制换行 @@ -64,6 +64,7 @@ class m_editor extends Component { filepath={`${this.props.filepath}`} content={editorValue} editor_type={editorType} + currentBranch={currentBranch} > )} diff --git a/src/forge/Order/order.css b/src/forge/Order/order.css index b0fe49fd0..f96d4146a 100644 --- a/src/forge/Order/order.css +++ b/src/forge/Order/order.css @@ -187,6 +187,9 @@ -o-text-overflow: ellipsis; text-overflow: ellipsis; } +.topWrapper_select.wrapperStyle li{ + width:90px; +} .topWrapper_select li { text-align: center; cursor: pointer; diff --git a/src/forge/Order/order.js b/src/forge/Order/order.js index 2a8349cac..0e725d2cc 100644 --- a/src/forge/Order/order.js +++ b/src/forge/Order/order.js @@ -608,7 +608,7 @@ class order extends Component { { checkedValue && checkedValue.length > 0 ? - + - {this.props.user && this.props.user.login ? + {this.props.user && this.props.user.login && - + - {/* - { - mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.new_syllabuses && - 新建课程 - } - { - mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.new_course && - 新建班级 - } - */} { coursestypes === true && this.props.user && this.props.user.main_site === false ? "" : - + 新建镜像项目 新建托管项目 } - : "" } - {this.props.user && this.props.user.login ? + {this.props.user && this.props.user.login && {user && user.login && @@ -801,7 +785,6 @@ class NewHeader extends Component { } - : "" } .-task-title { margin:0px auto; display: flex; align-items: center; - height: 100% + height: 100%; } .globalSpin { max-height: 700px !important;