forked from Gitlink/forgeplus-react
Merge branch 'develop' of http://git.trustie.net/jasder/forgeplus-react into develop
This commit is contained in:
commit
dcb01851b5
|
|
@ -39,7 +39,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 || ''
|
||||
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
|
||||
}
|
||||
// 超管
|
||||
// debugType="admin";
|
||||
|
|
|
|||
|
|
@ -294,9 +294,9 @@ class CoderRootDirectory extends Component{
|
|||
<div className="f-wrap-alignCenter">
|
||||
{
|
||||
subFileType !== "file" && (isManager || isDeveloper) &&
|
||||
<p className="addFile">
|
||||
<p className="addFile mr30">
|
||||
<Link to={`/projects/${projectsId}/coders/${branch}/newfile${urlRoot}`} >新建文件</Link>
|
||||
<Link to={``}>上传文件</Link>
|
||||
{/* <Link to={``}>上传文件</Link> */}
|
||||
</p>
|
||||
}
|
||||
{
|
||||
|
|
|
|||
|
|
@ -442,10 +442,10 @@ body,#root{
|
|||
padding: 0px 10px;
|
||||
}
|
||||
.addFile a:first-child{
|
||||
border-radius: 4px 0px 0px 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.addFile a:last-child{
|
||||
border-radius: 0px 4px 4px 0px;
|
||||
/* border-radius: 0px 4px 4px 0px; */
|
||||
border-left: 1px solid rgba(247, 247, 247, 0.3);
|
||||
}
|
||||
.addFile a:active{
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@ class UserSubmitComponent extends Component{
|
|||
|
||||
// 提交变更
|
||||
subMitFrom=()=>{
|
||||
const { current_user , filepath , content } = this.props;
|
||||
const { filepath , content } = this.props;
|
||||
const { branch , projectsId } = this.props.match.params;
|
||||
const { submitType } = this.state;
|
||||
let path = filepath.substr(1);
|
||||
this.props.form.validateFieldsAndScroll((err, values) => {
|
||||
if(!err){
|
||||
const url = `/${current_user && current_user.login}/${projectsId}/contents.json`;
|
||||
const url = `/repositories/${projectsId}/create_file.json`;
|
||||
axios.post(url,{
|
||||
filepath:path,
|
||||
branch:submitType==="0" ? branch : undefined,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ const Collaborator = Loadable({
|
|||
class Index extends Component{
|
||||
render(){
|
||||
const { projectsId } = this.props.match.params;
|
||||
console.log(this.props);
|
||||
const { pathname } = this.props.history.location;
|
||||
|
||||
const flag = (pathname === `/projects/${projectsId}/setting`);
|
||||
|
|
@ -36,7 +35,7 @@ class Index extends Component{
|
|||
<div className="main">
|
||||
<Switch {...this.props}>
|
||||
{/* 协作者 */}
|
||||
<Route path="/projects/:projectsId/collaborator"
|
||||
<Route path="/projects/:projectsId/setting/collaborator"
|
||||
render={
|
||||
(props) => (<Collaborator {...this.props} {...props} {...this.state}/>)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ class Setting extends Component{
|
|||
}
|
||||
|
||||
getInfo=()=>{
|
||||
const { current_user } = this.props;
|
||||
const { projectsId } = this.props.match.params;
|
||||
const url = `/repositories/${projectsId}/edit.json`;
|
||||
axios.get(url).then(result=>{
|
||||
|
|
|
|||
Loading…
Reference in New Issue