|
|
|
@ -1,5 +1,4 @@
|
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
|
|
|
|
|
import ActionView from './main/ActionView';
|
|
|
|
|
|
|
|
|
|
import LeftViewContainer from './main/LeftViewContainer';
|
|
|
|
@ -11,7 +10,8 @@ import CodeEvaluateView from './main/CodeEvaluateView';
|
|
|
|
|
import ChooseRepositoryView from './main/ChooseRepositoryView';
|
|
|
|
|
import ChooseEvaluateView from './main/ChooseEvaluateView'
|
|
|
|
|
|
|
|
|
|
import { Button } from 'antd'
|
|
|
|
|
import { CircularProgress } from 'material-ui/Progress';
|
|
|
|
|
import Button from 'material-ui/Button';
|
|
|
|
|
import VNCContainer from './VNCContainer'
|
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
|
|
|
|
@ -161,9 +161,11 @@ class MainContent extends Component {
|
|
|
|
|
?
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
<div style={{ display: (codeLoading ? 'block' : 'none'), textAlign: 'center' }}>
|
|
|
|
|
<CircularProgress size={40} thickness={3}
|
|
|
|
|
style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '18%' }} />
|
|
|
|
|
<span style={{ color: '#ddd', display: 'block' }}>正在加载中,请稍后...</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div style={{ display: (codeLoading ? 'none' : 'block'), height: '100%' }}>
|
|
|
|
|
<div style={{ display: (codeLoading ? 'none' : 'block') }}>
|
|
|
|
|
<CodeRepositoryViewContainer {...this.props} ></CodeRepositoryViewContainer>
|
|
|
|
|
</div>
|
|
|
|
|
</React.Fragment>
|
|
|
|
@ -178,7 +180,7 @@ class MainContent extends Component {
|
|
|
|
|
<div className="split-panel--second -layout -vertical -flex -relative -bg-black -flex-basic60"
|
|
|
|
|
id="games_valuation_contents" style={{ height: '258px', minHeight: '85px' }}>
|
|
|
|
|
{/* 测试结果、评测信息区域 */}
|
|
|
|
|
{loading ? <p>正在加载中...</p>
|
|
|
|
|
{loading ? <CircularProgress size={40} thickness={3} style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '10%', display: 'block' }} />
|
|
|
|
|
:
|
|
|
|
|
st === 0
|
|
|
|
|
? <CodeEvaluateView output_sets={output_sets} latest_output={latest_output}
|
|
|
|
@ -189,70 +191,15 @@ class MainContent extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
></VNCContainer>
|
|
|
|
|
<div id="actionView" className="-layout-h -center -bg-grey-90 -grey-20 -bg-darkblack">
|
|
|
|
|
<ActionView {...this.props}
|
|
|
|
|
onRunCodeTest={onRunCodeTest}
|
|
|
|
|
></ActionView>
|
|
|
|
|
</div>
|
|
|
|
|
</CodeRepositoryViewContainer>
|
|
|
|
|
:
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
|
|
|
|
|
<div className="-layout-v -flex">
|
|
|
|
|
<div className="-flex -relative">
|
|
|
|
|
<div className="split-panel -fit -vertical" id="games_repository_valuation">
|
|
|
|
|
<div className="-layout -stretch -fit -vertical centerH">
|
|
|
|
|
<div className="-layout -vertical -flex -relative -flex-basic70 -bg-weightblack"
|
|
|
|
|
id="games_repository_contents" style={games_repository_contents_style} >
|
|
|
|
|
|
|
|
|
|
{/* 选择题或编程题 */}
|
|
|
|
|
{/* readRepoTimeout 如果读取代码超时,显示重新加载按钮,重新拉取代码 */}
|
|
|
|
|
{
|
|
|
|
|
st === 0
|
|
|
|
|
?
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
<div style={{ display: (codeLoading ? 'block' : 'none'), textAlign: 'center' }}>
|
|
|
|
|
<CircularProgress size={40} thickness={3}
|
|
|
|
|
style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '18%' }} />
|
|
|
|
|
<span style={{ color: '#ddd', display: 'block' }}>正在加载中,请稍后...</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div style={{ display: (codeLoading ? 'none' : 'block') }}>
|
|
|
|
|
<CodeRepositoryViewContainer {...this.props} ></CodeRepositoryViewContainer>
|
|
|
|
|
</div>
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
: <ChooseRepositoryView ref="chooseQ" chooseQfun={(ref) => this.chooseQfun(ref)}{...this.props}></ChooseRepositoryView>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{/* */}
|
|
|
|
|
</div>
|
|
|
|
|
<div className="h-center" style={{ top: '438px' }}>
|
|
|
|
|
{/*<div className="-changebg -bg-weightblack" id="-bg-change-color"></div>*/}
|
|
|
|
|
</div>
|
|
|
|
|
<div className="split-panel--second -layout -vertical -flex -relative -bg-black -flex-basic60"
|
|
|
|
|
id="games_valuation_contents" style={{ height: '258px', minHeight: '85px' }}>
|
|
|
|
|
{/* 测试结果、评测信息区域 */}
|
|
|
|
|
{loading ? <CircularProgress size={40} thickness={3} style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '10%', display: 'block' }} />
|
|
|
|
|
:
|
|
|
|
|
st === 0
|
|
|
|
|
? <CodeEvaluateView output_sets={output_sets} latest_output={latest_output}
|
|
|
|
|
record={record} onTestSetHeaderClick={onTestSetHeaderClick} {...this.props}></CodeEvaluateView>
|
|
|
|
|
: <ChooseEvaluateView {...this.props}></ChooseEvaluateView>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="actionView"
|
|
|
|
|
style={{ position: 'absolute', width: '100%', bottom: '0', height: '51px' }}
|
|
|
|
|
className="-layout-h -center -bg-grey-90 -grey-20 -bg-darkblack">
|
|
|
|
|
<ActionView {...this.props} onRunCodeTest={onRunCodeTest}></ActionView>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="actionView"
|
|
|
|
|
style={{ position: 'absolute', width: '100%', bottom: '0', height: '51px' }}
|
|
|
|
|
className="-layout-h -center -bg-grey-90 -grey-20 -bg-darkblack">
|
|
|
|
|
<ActionView {...this.props} onRunCodeTest={onRunCodeTest}></ActionView>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|