Merge branch 'gitlink_server' of https://git.trustie.net/caishi/forgeplus-react into feature_md

This commit is contained in:
何童崇 2022-11-15 16:08:00 +08:00
commit f13830faca
3 changed files with 9 additions and 9 deletions

View File

@ -51,7 +51,11 @@ class NewHeader extends Component {
}
}
componentDidMount() {
this.geturlsdata();
// this.geturlsdata();
let settings = localStorage.chromesetting&&JSON.parse(localStorage.chromesetting);
this.setState({
settings
})
window._header_componentHandler = this;
try {

View File

@ -75,8 +75,6 @@ function CoderDepot(props){
}
if(i && i.length === 0){
setIssuesFlag(false);
console.log(bannerList);
}
}
},[bannerList])
@ -86,7 +84,7 @@ function CoderDepot(props){
const url = `/users/action.json`;
axios.post(url,{
action_type:"webide-pr",
action_type:"webide",
action_id:projectDetail && projectDetail.repo_id
}).then(result=>{});
window.open(path,"_blank");
@ -105,7 +103,6 @@ function CoderDepot(props){
},[details])
useEffect(()=>{
console.log('treeValue:'+treeValue);
if(treeValue){
setTreeValuePath(decodeURIComponent(treeValue).split('/'));
}else{
@ -360,7 +357,6 @@ function CoderDepot(props){
const baseOper = current_user && current_user.login && issuesFlag;
const baseOperate = projectDetail && projectDetail.permission && projectDetail.permission !=="Reporter" && projectDetail.type !== 2 && pullsFlag && props.platform;
const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && ((projectDetail.permission && projectDetail.permission !=="Reporter") || (current_user && current_user.admin));
console.log("maidian:",props);
return(
<WhiteBack>
<UpdateDescModal desc={desc} website={website} lesson_url={lesson_url} visible={openModal} onCancel={()=>setOpenModal(false)} onOk={okUpdate}/>
@ -479,7 +475,7 @@ function CoderDepot(props){
checkIfLogin && checkIfLogin()?
<a className='newBtn' onClick={()=>eventTrack(`/${owner}/${projectsId}/webIDE/tree/${defaultBranch}`)}>Web IDE <div className='newBtnImg'></div></a>
:
<a className='newBtn' onClick={showLoginDialog}>Web IDE <div className='newBtnImg'></div></a>
<a className='newBtn' onClick={()=>{showLoginDialog(`/${owner}/${projectsId}`)}}>Web IDE <div className='newBtnImg'></div></a>
}
<Dropdown overlay={downloadMenu} placement="bottomRight" trigger={['click']}>

View File

@ -303,8 +303,8 @@ class MessageCount extends Component {
codeReview=()=>{
const {history,match , checkIfLogin , showLoginDialog}=this.props;
const { projectsId, mergeId , owner } =match.params;
if(checkIfLogin && checkIfLogin()){
const { projectsId, mergeId , owner } =match.params;
const { repo_id } = this.props && this.props.projectDetail;
// 埋点
const url = `/users/action.json`;
@ -317,7 +317,7 @@ class MessageCount extends Component {
}
});
}else{
showLoginDialog && showLoginDialog();
showLoginDialog && showLoginDialog(`/${owner}/${projectsId}/pulls/${mergeId}`);
}
}