forked from Gitlink/forgeplus-react
debug
This commit is contained in:
parent
7b2f233cae
commit
1bab0b01f7
|
@ -24,16 +24,21 @@ class IndexItem extends Component {
|
|||
})
|
||||
}
|
||||
|
||||
projectHref=(link , user_apply_signatures,project_id,is_secret)=>{
|
||||
let signa = user_apply_signatures && user_apply_signatures[0];
|
||||
if(is_secret && (signa && signa.status !== "passed")){
|
||||
this.setState({
|
||||
visible:true,
|
||||
user_apply_signatures:user_apply_signatures.length>0 ? user_apply_signatures[0] : undefined,
|
||||
project_id
|
||||
})
|
||||
projectHref=(link , user_apply_signatures,project_id,is_secret , id)=>{
|
||||
const { user , showLoginDialog } = this.props;
|
||||
if(user && user.login){
|
||||
let signa = user_apply_signatures && user_apply_signatures[0];
|
||||
if((is_secret && (!signa || (signa && signa.status !== "passed"))) && user.login !== id ){
|
||||
this.setState({
|
||||
visible:true,
|
||||
user_apply_signatures:user_apply_signatures.length>0 ? user_apply_signatures[0] : undefined,
|
||||
project_id
|
||||
})
|
||||
}else{
|
||||
this.props.history.push(link);
|
||||
}
|
||||
}else{
|
||||
this.props.history.push(link);
|
||||
showLoginDialog && showLoginDialog();
|
||||
}
|
||||
}
|
||||
hideModal=()=>{
|
||||
|
@ -67,7 +72,7 @@ class IndexItem extends Component {
|
|||
}
|
||||
<div className="p-r-Infos">
|
||||
<div className="p-r-name">
|
||||
<a onClick={()=>this.projectHref(`/projects/${item.author.login}/${item.identifier}`,item.user_apply_signatures, item.id,item.is_secret)} className="hide-1 color-grey-3 font-18 task-hide fwt-500 " style={{ whiteSpace: "wrap", display: 'flex', width: 400 }}>
|
||||
<a onClick={()=>this.projectHref(`/projects/${item.author.login}/${item.identifier}`,item.user_apply_signatures, item.id,item.is_secret,item.author.login)} className="hide-1 color-grey-3 font-18 task-hide fwt-500 " style={{ whiteSpace: "wrap", display: 'flex', width: 400 }}>
|
||||
{item.author.name}/{item.name}
|
||||
{
|
||||
item.forked_from_project_id ?
|
||||
|
|
|
@ -54,7 +54,7 @@ function Single({ children , showNotification , className , load , size }) {
|
|||
if(!size) return;
|
||||
const isLt100M = file.size / 1024 / 1024 < size;
|
||||
if (!isLt100M) {
|
||||
this.props.showNotification(`文件大小必须小于${size}MB!`);
|
||||
showNotification(`文件大小必须小于${size}MB!`);
|
||||
}
|
||||
return isLt100M;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue