diff --git a/src/forge/Main/CoderRootDirectory.js b/src/forge/Main/CoderRootDirectory.js
index 02dcdadbf..21a6a59f9 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 e2c57d72e..e24d167b3 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 50f4b3189..2a391bc6c 100644
--- a/src/forge/Settings/Branch.js
+++ b/src/forge/Settings/Branch.js
@@ -64,7 +64,7 @@ export default ((props)=>{