bug
This commit is contained in:
parent
fd19a43168
commit
0bfa7572a5
|
@ -25,7 +25,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 || 'student'
|
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
|
||||||
}
|
}
|
||||||
window._debugType = debugType;
|
window._debugType = debugType;
|
||||||
export function initAxiosInterceptors(props) {
|
export function initAxiosInterceptors(props) {
|
||||||
|
|
|
@ -380,7 +380,7 @@ function CoderDepot(props){
|
||||||
(dirInfo && dirInfo.length === 0) && (fileInfo && fileInfo.length === 0) ? <Nodata _html="暂未发现文件"/> :""
|
(dirInfo && dirInfo.length === 0) && (fileInfo && fileInfo.length === 0) ? <Nodata _html="暂未发现文件"/> :""
|
||||||
}
|
}
|
||||||
{/* readme文件显示(显示文件详情时不显示readme文件) */}
|
{/* readme文件显示(显示文件详情时不显示readme文件) */}
|
||||||
{ dirInfo && readme ? <ReadMe ChangeFile={ChangeFile} readme={readme} operate={props && (props.isManager || props.isDeveloper) && projectDetail.type !==2 } history={props.history} /> :"" }
|
{ dirInfo && (readme && readme.content) ? <ReadMe ChangeFile={ChangeFile} readme={readme} operate={props && (props.isManager || props.isDeveloper) && projectDetail.type !==2 } history={props.history} /> :"" }
|
||||||
</div>
|
</div>
|
||||||
</LongWidth>
|
</LongWidth>
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,6 +11,8 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(readme && readme.content){
|
if(readme && readme.content){
|
||||||
setContent(readme.content);
|
setContent(readme.content);
|
||||||
|
}else{
|
||||||
|
setContent(undefined);
|
||||||
}
|
}
|
||||||
},[readme])
|
},[readme])
|
||||||
|
|
||||||
|
|
|
@ -462,7 +462,7 @@ class Detail extends Component {
|
||||||
firstSync ? "":
|
firstSync ? "":
|
||||||
<span className="df mt25">
|
<span className="df mt25">
|
||||||
{
|
{
|
||||||
current_user && current_user.login && (projectDetail && projectDetail.type && projectDetail.type === 2) ?
|
((current_user && current_user.admin) || isManager) && (projectDetail && projectDetail.type && projectDetail.type === 2) ?
|
||||||
<a className="synchronism ml30" onClick={this.synchronismMirror}>同步镜像</a> : ""
|
<a className="synchronism ml30" onClick={this.synchronismMirror}>同步镜像</a> : ""
|
||||||
}
|
}
|
||||||
<span className="detail_tag_btn">
|
<span className="detail_tag_btn">
|
||||||
|
@ -639,6 +639,11 @@ class Detail extends Component {
|
||||||
}
|
}
|
||||||
></Route>
|
></Route>
|
||||||
{/* 新建合并请求 */}
|
{/* 新建合并请求 */}
|
||||||
|
<Route path="/projects/:owner/:projectsId/pulls/new/:branch"
|
||||||
|
render={
|
||||||
|
(props) => (<CreateMerge {...this.props} {...props} {...this.state} {...common} is_fork={true} />)
|
||||||
|
}
|
||||||
|
></Route>
|
||||||
<Route path="/projects/:owner/:projectsId/pulls/new"
|
<Route path="/projects/:owner/:projectsId/pulls/new"
|
||||||
render={
|
render={
|
||||||
(props) => (<CreateMerge {...this.props} {...props} {...this.state} {...common} is_fork={true} />)
|
(props) => (<CreateMerge {...this.props} {...props} {...this.state} {...common} is_fork={true} />)
|
||||||
|
|
|
@ -9,13 +9,14 @@ const Option = Select.Option;
|
||||||
class NewMerge extends Component {
|
class NewMerge extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
const { branch } = this.props.match.params;
|
||||||
this.state = {
|
this.state = {
|
||||||
data: undefined,
|
data: undefined,
|
||||||
branches: undefined,
|
branches: undefined,
|
||||||
merge_branches: undefined,
|
merge_branches: undefined,
|
||||||
merge_projects: undefined,
|
merge_projects: undefined,
|
||||||
merge: "master",
|
merge: "master",
|
||||||
pull: "master",
|
pull: branch,
|
||||||
id: undefined,
|
id: undefined,
|
||||||
is_fork: false,
|
is_fork: false,
|
||||||
projects_names: undefined,
|
projects_names: undefined,
|
||||||
|
@ -113,6 +114,8 @@ class NewMerge extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
set_default_pull = (branches) => {
|
set_default_pull = (branches) => {
|
||||||
|
const { branch } = this.props.match.params;
|
||||||
|
if(!branch){
|
||||||
if(branches && branches.length>0){
|
if(branches && branches.length>0){
|
||||||
let default_pull = branches.filter((e) => e.name === "master")
|
let default_pull = branches.filter((e) => e.name === "master")
|
||||||
if (default_pull.length > 0){
|
if (default_pull.length > 0){
|
||||||
|
@ -126,6 +129,7 @@ class NewMerge extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
set_default_merge = (merge_branches) => {
|
set_default_merge = (merge_branches) => {
|
||||||
if(merge_branches && merge_branches.length){
|
if(merge_branches && merge_branches.length){
|
||||||
|
@ -163,10 +167,12 @@ class NewMerge extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
selectBrach = (type, value) => {
|
selectBrach = (type, value) => {
|
||||||
|
const { projectsId , owner } = this.props.match.params;
|
||||||
this.state[type] = value;
|
this.state[type] = value;
|
||||||
this.ischeckmerge();
|
this.ischeckmerge();
|
||||||
let { id ,merge , pull } = this.state;
|
let { id ,merge , pull } = this.state;
|
||||||
if(type==="pull"){
|
if(type==="pull"){
|
||||||
|
this.props.history.push(`/projects/${owner}/${projectsId}/pulls/new/${pull}`)
|
||||||
this.compareProject(id,value,merge);
|
this.compareProject(id,value,merge);
|
||||||
}else{
|
}else{
|
||||||
this.compareProject(id,pull,value);
|
this.compareProject(id,pull,value);
|
||||||
|
|
|
@ -144,7 +144,7 @@ export default Form.create()(
|
||||||
</div>
|
</div>
|
||||||
<p className="mt20">
|
<p className="mt20">
|
||||||
<Button type="primary" className="mr30" onClick={createOrganize}>创建组织</Button>
|
<Button type="primary" className="mr30" onClick={createOrganize}>创建组织</Button>
|
||||||
<Button className="grey">取消</Button>
|
<Button className="grey" onClick={()=>{window.history.back(-1)}}>取消</Button>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -43,6 +43,7 @@ export default Form.create()(
|
||||||
}
|
}
|
||||||
Axios.put(url,params).then(result=>{
|
Axios.put(url,params).then(result=>{
|
||||||
if(result && result.data){
|
if(result && result.data){
|
||||||
|
props.showNotification("资料修改成功!")
|
||||||
resetUser && resetUser(result.data);
|
resetUser && resetUser(result.data);
|
||||||
}
|
}
|
||||||
}).catch(error=>{})
|
}).catch(error=>{})
|
||||||
|
|
|
@ -84,7 +84,7 @@ function Index(props) {
|
||||||
let percent = result.data.user && result.data.user.languages_percent;
|
let percent = result.data.user && result.data.user.languages_percent;
|
||||||
let arr = [];
|
let arr = [];
|
||||||
Object.keys(percent).map((item,key)=>{
|
Object.keys(percent).map((item,key)=>{
|
||||||
arr.push({name:item,p:percent[item]*100,color:getColor()});
|
arr.push({name:item,p:parseFloat(percent[item]*100).toFixed(1),color:getColor()});
|
||||||
})
|
})
|
||||||
setPercentData(arr);
|
setPercentData(arr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ function Team(props){
|
||||||
<div>
|
<div>
|
||||||
<div className="headerbox">
|
<div className="headerbox">
|
||||||
<div>
|
<div>
|
||||||
<Search value={search} onChange={(e)=>setSearch(e.target.value)} placeholder="请输入项目名称关键字进行搜索" onSearch={onSearch}/>
|
<Search value={search} onChange={(e)=>setSearch(e.target.value)} placeholder="请输入组织名称关键字进行搜索" onSearch={onSearch}/>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
<Link to={`/organize/new`}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</Link>
|
<Link to={`/organize/new`}><i className="iconfont icon-xinjian1 mr3 font-14"></i>新建组织</Link>
|
||||||
|
|
Loading…
Reference in New Issue