|
|
|
@ -17,17 +17,15 @@ import Button from 'material-ui/Button';
|
|
|
|
|
import './tpiPage.css';
|
|
|
|
|
import './tpiPageForMobile.css';
|
|
|
|
|
const $ = window.$;
|
|
|
|
|
const showIframeContent = window.location.search.indexOf('vnc=1') != -1;
|
|
|
|
|
// const showIframeContent = window.location.search.indexOf('vnc=1') != -1;
|
|
|
|
|
class MainContent extends Component {
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
// ios下图标位置有问题
|
|
|
|
|
if (!showIframeContent) {
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
if (window.$('.b-label>.resize-helper').position().top < 100) {
|
|
|
|
|
window.$('.b-label>.resize-helper').css('top', '200px')
|
|
|
|
|
}
|
|
|
|
|
}, 4000)
|
|
|
|
|
}
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
if (window.$('.b-label>.resize-helper').position().top < 100) {
|
|
|
|
|
window.$('.b-label>.resize-helper').css('top', '200px')
|
|
|
|
|
}
|
|
|
|
|
}, 4000)
|
|
|
|
|
$("body").css("padding-right","0px!important")
|
|
|
|
|
}
|
|
|
|
|
onResizeButtonClick = () => {
|
|
|
|
@ -35,7 +33,7 @@ class MainContent extends Component {
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
const { challenge, output_sets, onRunCodeTest, latest_output, record, st, readRepoTimeout,
|
|
|
|
|
onTestSetHeaderClick, loading, codeLoading } = this.props
|
|
|
|
|
onTestSetHeaderClick, loading, codeLoading, shixun, vnc_url } = this.props
|
|
|
|
|
|
|
|
|
|
// if (output_sets && output_sets.test_sets) {
|
|
|
|
|
// const test_sets_array = JSON.parse("[" + output_sets.test_sets + "]");
|
|
|
|
@ -48,6 +46,7 @@ class MainContent extends Component {
|
|
|
|
|
} else {
|
|
|
|
|
games_repository_contents_style = {overflow: 'hidden', height: '445px'}
|
|
|
|
|
}
|
|
|
|
|
const showIframeContent = shixun && shixun.vnc == true
|
|
|
|
|
return (
|
|
|
|
|
<div className="page--body -margin-t-64 -flex">
|
|
|
|
|
<div className="-layout -stretch -fit labelN" id="game_show_content">
|
|
|
|
@ -68,19 +67,21 @@ class MainContent extends Component {
|
|
|
|
|
<div className="split-panel--second -layout -vertical -flex -relative -flex-basic50"
|
|
|
|
|
id="game_right_contents" style={{width: '996px'}}>
|
|
|
|
|
{/*
|
|
|
|
|
iframe模式下需要这两个样式来调整
|
|
|
|
|
.page--body { z-index: 9999; }
|
|
|
|
|
.resize-helper { top: 10px }
|
|
|
|
|
iframe模式下可以使用样式控制不接收鼠标事件
|
|
|
|
|
|
|
|
|
|
.page--body { z-index: ${showIframeContent ? '7999': '1'} ; }
|
|
|
|
|
.b-label>.resize-helper { top: ${showIframeContent ? '10px': '50%'} }
|
|
|
|
|
|
|
|
|
|
*/}
|
|
|
|
|
<style>{`
|
|
|
|
|
#contentIframe {
|
|
|
|
|
height: 100%;
|
|
|
|
|
background: #fff;
|
|
|
|
|
}
|
|
|
|
|
.page--body { z-index: ${showIframeContent ? '7999': '1'} ; }
|
|
|
|
|
.b-label>.resize-helper { top: ${showIframeContent ? '10px': '50%'} }
|
|
|
|
|
.page--body { z-index: 9999; }
|
|
|
|
|
.resize-helper { top: 10px }
|
|
|
|
|
`}</style>
|
|
|
|
|
{ showIframeContent ? <iframe src="http://106.75.27.125:42288/vnc.html" id="contentIframe" ></iframe> :
|
|
|
|
|
{ showIframeContent ? <iframe src={vnc_url ||"http://106.75.27.125:42288/vnc.html"} id="contentIframe" ></iframe> :
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
{/* 旧版本、评测等待提示--更新提示块*/}
|
|
|
|
|
{/*<div className="tip-panel-animate clearfix user_bg_shadow bor-grey-e">
|
|
|
|
|