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