diff --git a/public/index.html b/public/index.html index 83b5b564..0843aee7 100755 --- a/public/index.html +++ b/public/index.html @@ -55,6 +55,7 @@ + diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 2c8e966b..3ab02510 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -1,5 +1,5 @@ import React , { Component } from 'react'; -import { Spin } from 'antd'; +import { Spin , Tooltip } from 'antd'; import { Link , Route , Switch,withRouter } from 'react-router-dom'; import '../css/index.css' @@ -302,7 +302,6 @@ class Detail extends Component{ const { projectsId } = this.props.match.params; const { state } = this.props.history.location; - return(
@@ -317,29 +316,45 @@ class Detail extends Component{ } / - + { projectDetail && projectDetail.name } - - + { + projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ? + + + + + :"" + } +

- { - projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ? -
- - - - forked from - - {projectDetail.fork_info.fork_project_user_name} - - / - - { projectDetail.fork_info.fork_form_name } - -
- : + {/* { + projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ? */} + {/* + + */} + {/* //
+ // + // + // + // forked from + // + // {projectDetail.fork_info.fork_project_user_name} + // + // / + // + // { projectDetail.fork_info.fork_form_name } + // + //
*/} + {/* : "" - } + } */}
diff --git a/src/modules/page/Index.js b/src/modules/page/Index.js index 1e31449c..eb383482 100644 --- a/src/modules/page/Index.js +++ b/src/modules/page/Index.js @@ -13,37 +13,6 @@ import update from 'immutability-helper' import axios from 'axios'; - -// import { getUrl } from 'educoder' -// let _url_origin = getUrl() -// const $ = window.$ -// let prefix = '/react/build' -// if (window.location.port == 3007) { -// prefix = '' -// } else { -// } - -// 下面这个加载方式有问题,改到html 写script标签 -// if (!window['TPIScriptLoaded']) { -// // $('head').append($('') -// // .attr('href', `${_url_origin}${prefix}/js/xterm/xterm.css`)); - -// $.when( -// $.getScript( `${_url_origin}/assets/kindeditor/kindeditor.js` ), -// $.getScript( `${_url_origin}${prefix}/js/create_kindeditor.js` ), -// $.getScript( `${_url_origin}/javascripts/educoder/edu_application.js` ), -// $.Deferred(function( deferred ){ -// $( deferred.resolve ); -// }) -// ).done(function(){ -// window.TPIScriptLoaded = true -// //place your code here, the scripts are all loaded -// // callback && callback() -// }); -// } else { -// // callback && callback() -// } - class Index extends Component { constructor(props) { super(props) @@ -53,31 +22,16 @@ class Index extends Component { styles += 'overflow: hidden !important;' window.$('body').attr('style', styles); window.$('#root').css('position', 'absolute') - - // TPI浏览器缩放 - // setTimeout(() => { - // const agent = navigator.userAgent; - // if (agent.indexOf('Mac OS') == -1) { - // window._initZoomCheck() - // } - // }, 800) - - this.onDrawerButtonClick = this.onDrawerButtonClick.bind(this) this.onStarChange = this.onStarChange.bind(this) this.saveChallengeStar = this.saveChallengeStar.bind(this) this.onChallengesDrawerClose = this.onChallengesDrawerClose.bind(this) - - this.starArray = []; - // 将原本放置在Header.js中的state上提到Index.js this.state = { challengesDrawerOpen: false, taskListLoading: true, challenges: [], // 任务列表 - - } } @@ -92,7 +46,6 @@ class Index extends Component { return; } const { shixun, myshixun } = this.props; - // var getChallengesUrl = `/api/v1/games/${this.props.game.identifier}/challenges`; var getChallengesUrl = `/myshixuns/${myshixun.identifier}/challenges.json`; this.setState({ @@ -100,9 +53,7 @@ class Index extends Component { challengesDrawerOpen:true }) - axios.get(getChallengesUrl, { - // withCredentials: true, - }) + axios.get(getChallengesUrl) .then((response) => { if (response.data.status == -1) {