forked from Gitlink/forgeplus-react
CI服务
This commit is contained in:
parent
5f36f9306a
commit
68eb499a8c
|
@ -27,7 +27,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 || 'admin'
|
||||
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student'
|
||||
}
|
||||
function clearAllCookie() {
|
||||
cookie.remove('_educoder_session', { path: '/' });
|
||||
|
|
|
@ -80,6 +80,8 @@ function CIdispose(props){
|
|||
setStep(result.data.step);
|
||||
props.showNotification("服务器绑定成功!");
|
||||
}
|
||||
}).catch((error)=>{
|
||||
setBtnLoading(false);
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
@ -59,6 +59,13 @@ class Infos extends Component {
|
|||
componentDidMount = () => {
|
||||
this.fetchUser();
|
||||
};
|
||||
componentDidUpdate=(prevProps)=>{
|
||||
const { username } = this.props.match.params;
|
||||
const prevUser = prevProps.match.params.username;
|
||||
if(prevUser && username && prevUser !== username){
|
||||
this.fetchUser();
|
||||
}
|
||||
}
|
||||
|
||||
fetchUser = () => {
|
||||
this.setState({
|
||||
|
@ -132,6 +139,8 @@ class Infos extends Component {
|
|||
|
||||
render() {
|
||||
const { current_user, mygetHelmetapi } = this.props;
|
||||
const { username } = this.props.match.params;
|
||||
|
||||
const { user, isSpin, project_type, route_type } = this.state;
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
|
@ -253,7 +262,7 @@ class Infos extends Component {
|
|||
</ul>
|
||||
</div>
|
||||
{
|
||||
current_user && current_user.login &&
|
||||
current_user && current_user.login && current_user.login === username &&
|
||||
<div className="bgcF">
|
||||
<ul className="list-l-Menu">
|
||||
<li className="MenuTitle">
|
||||
|
|
|
@ -29,14 +29,17 @@ class InfosUser extends Component {
|
|||
};
|
||||
|
||||
componentDidUpdate = (prevProps) => {
|
||||
if (prevProps.project_type !== this.props.project_type) {
|
||||
const { username } = this.props.match.params;
|
||||
const prevUser = prevProps.match.params.username;
|
||||
if (prevProps.project_type !== this.props.project_type || (prevUser && username && prevUser !== username)) {
|
||||
this.get_projects();
|
||||
}
|
||||
};
|
||||
|
||||
get_projects = (isPublic) => {
|
||||
const { user, project_type } = this.props;
|
||||
const url = `/users/${user && user.login}/projects.json`;
|
||||
const { username } = this.props.match.params;
|
||||
const { project_type } = this.props;
|
||||
const url = `/users/${username}/projects.json`;
|
||||
const { page, limit, search, sort_by, category , is_public } = this.state;
|
||||
this.setState({
|
||||
isSpin: true,
|
||||
|
|
Loading…
Reference in New Issue