diff --git a/src/forge/Main/CoderRootDirectory.js b/src/forge/Main/CoderRootDirectory.js index 02dcdadb..21a6a59f 100644 --- a/src/forge/Main/CoderRootDirectory.js +++ b/src/forge/Main/CoderRootDirectory.js @@ -406,6 +406,7 @@ class CoderRootDirectory extends Component { let branch = branchName || defaultBranch; const columns = [ { + key:"name", dataIndex: 'name', width:"30%", render: (text,item) => ( @@ -415,7 +416,8 @@ class CoderRootDirectory extends Component { ), }, { - dataIndex: "commit", + key:"message", + dataIndex: "message", width: "60%", render: (text, item) => item.commit && item.commit.message ? @@ -425,7 +427,8 @@ class CoderRootDirectory extends Component { : "" }, { - dataIndex: "commit", + key:"time_from_now", + dataIndex: "time_from_now", width: "10%", className: "edu-txt-right", render: (text, item) => diff --git a/src/forge/Newfile/UserSubmitComponent.js b/src/forge/Newfile/UserSubmitComponent.js index e2c57d72..e24d167b 100644 --- a/src/forge/Newfile/UserSubmitComponent.js +++ b/src/forge/Newfile/UserSubmitComponent.js @@ -54,9 +54,7 @@ class UserSubmitComponent extends Component { const { getTopCount } = this.props; getTopCount && getTopCount(values.branchname); } - let url = values.branchname - ? `/projects/${owner}/${projectsId}/branch/${values.branchname}` - : `/projects/${owner}/${projectsId}`; + let url = `/projects/${owner}/${projectsId}${values.branchname ? `/branch/${values.branchname}`: (branch ? `/branch/${branch}` : "")}`; this.props.history.push(url); } }) @@ -73,7 +71,7 @@ class UserSubmitComponent extends Component { // 确认修改文件 UpdateFile = () => { this.setState({ isSpin: true }); - const { branch, detail, content, filepath } = this.props; + const { branch, detail, content , currentBranch } = this.props; const { projectsId , owner } = this.props.match.params; const { submitType } = this.state; const url = `/${owner}/${projectsId}/update_file.json`; @@ -82,7 +80,7 @@ class UserSubmitComponent extends Component { axios .put(url, { filepath: detail.path, - branch: branch, + branch: submitType === "1" ? undefined : (currentBranch || branch), new_branch: submitType === "1" ? values.branchname : undefined, content: content, sha: detail.sha, @@ -91,12 +89,10 @@ class UserSubmitComponent extends Component { .then((result) => { this.setState({ isSpin: false }); if (result.data && result.data.status === 1) { - let url = values.branchname - ? `/projects/${owner}/${projectsId}/branch/${values.branchname}` - : `/projects/${owner}/${projectsId}`; - + debugger; + let url = `/projects/${owner}/${projectsId}${(values.branchname ? `/branch/${values.branchname}` : ((currentBranch || branch) ? `/branch/${currentBranch || branch}`:""))}`; this.props.history.push(url); - this.props.showNotification("修改成功!"); + this.props.showNotification("文件修改成功!"); } }) .catch((error) => { diff --git a/src/forge/Settings/Branch.js b/src/forge/Settings/Branch.js index 50f4b318..2a391bc6 100644 --- a/src/forge/Settings/Branch.js +++ b/src/forge/Settings/Branch.js @@ -64,7 +64,7 @@ export default ((props)=>{ settingRule()}>+ 新建规则 -
  • 限制分支的推送、合并。强制推送相关请去仓库设置
  • +
  • 限制分支的推送、合并。强制推送相关请去{props.history.push(`/projects/${owner}/${projectsId}/setting`)}}>仓库设置
  • 一个分支同时只能有一个保护分支规则生效,越早创建的规则优先级越高。
  • 保护分支规则只影响状态是【保护分支】的分支。【常规分支】和【只读分支】都不影响。
  • diff --git a/src/forge/Settings/Index.js b/src/forge/Settings/Index.js index 31ecdefd..c46f4839 100644 --- a/src/forge/Settings/Index.js +++ b/src/forge/Settings/Index.js @@ -65,7 +65,7 @@ class Index extends Component {

    - {/*
  • -1 ? "active" : "" } @@ -76,7 +76,7 @@ class Index extends Component { 分支设置

    -
  • */} +
  • -1 ? "active" : ""} >