forked from Gitlink/forgeplus-react
编辑文件-提交至
This commit is contained in:
parent
4f13421872
commit
3949584549
|
@ -521,6 +521,7 @@ class CoderRootDirectory extends Component {
|
||||||
{...this.state}
|
{...this.state}
|
||||||
readOnly={this.state.readOnly}
|
readOnly={this.state.readOnly}
|
||||||
onEdit={this.onEdit}
|
onEdit={this.onEdit}
|
||||||
|
currentBranch={branch}
|
||||||
></CoderRootFileDetail>
|
></CoderRootFileDetail>
|
||||||
)}
|
)}
|
||||||
{
|
{
|
||||||
|
|
|
@ -164,7 +164,8 @@ class CoderRootFileDetail extends Component {
|
||||||
current_user,
|
current_user,
|
||||||
isManager,
|
isManager,
|
||||||
isDeveloper,
|
isDeveloper,
|
||||||
md
|
md,
|
||||||
|
currentBranch
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { language, languages, description } = this.state;
|
const { language, languages, description } = this.state;
|
||||||
let flag = current_user && current_user.login && (isManager || isDeveloper);
|
let flag = current_user && current_user.login && (isManager || isDeveloper);
|
||||||
|
@ -194,12 +195,9 @@ class CoderRootFileDetail extends Component {
|
||||||
<a onClick={() => this.EditFile(false)} className="ml20">
|
<a onClick={() => this.EditFile(false)} className="ml20">
|
||||||
<i className="iconfont icon-bianji1 font-15 color-grey-6"></i>
|
<i className="iconfont icon-bianji1 font-15 color-grey-6"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
) : (
|
) : (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<Select
|
<Select
|
||||||
|
@ -273,6 +271,7 @@ class CoderRootFileDetail extends Component {
|
||||||
content={detail.content}
|
content={detail.content}
|
||||||
readOnly={readOnly}
|
readOnly={readOnly}
|
||||||
editorType="update"
|
editorType="update"
|
||||||
|
currentBranch={currentBranch}
|
||||||
></Meditor>
|
></Meditor>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -115,7 +115,7 @@ class UserSubmitComponent extends Component {
|
||||||
|
|
||||||
const { branch, projectsId , owner } = this.props.match.params;
|
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;
|
const { editor_type } = this.props;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
@ -175,7 +175,7 @@ class UserSubmitComponent extends Component {
|
||||||
>
|
>
|
||||||
<Radio value="0" className="mb10">
|
<Radio value="0" className="mb10">
|
||||||
<i className="iconfont icon-banbenku font-16 mr5"></i>
|
<i className="iconfont icon-banbenku font-16 mr5"></i>
|
||||||
直接提交至<span className="color-orange">{branch}</span>分支
|
直接提交至<span className="color-orange">{currentBranch || branch}</span>分支
|
||||||
</Radio>
|
</Radio>
|
||||||
<Radio value="1">
|
<Radio value="1">
|
||||||
<Icon type="pull-request" className="mr5" />
|
<Icon type="pull-request" className="mr5" />
|
||||||
|
|
|
@ -20,7 +20,7 @@ class m_editor extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { editorValue } = this.state;
|
const { editorValue } = this.state;
|
||||||
const { readOnly, editorType, language } = this.props;
|
const { readOnly, editorType, language , currentBranch } = this.props;
|
||||||
const editor_options = {
|
const editor_options = {
|
||||||
lineNumbers: "on",
|
lineNumbers: "on",
|
||||||
wordWrap: true, //强制换行
|
wordWrap: true, //强制换行
|
||||||
|
@ -64,6 +64,7 @@ class m_editor extends Component {
|
||||||
filepath={`${this.props.filepath}`}
|
filepath={`${this.props.filepath}`}
|
||||||
content={editorValue}
|
content={editorValue}
|
||||||
editor_type={editorType}
|
editor_type={editorType}
|
||||||
|
currentBranch={currentBranch}
|
||||||
></UserSubmitComponent>
|
></UserSubmitComponent>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue