|
|
@ -1,21 +1,14 @@
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
|
|
|
|
|
|
|
import { Redirect } from 'react-router';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import classNames from 'classnames';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import axios from 'axios';
|
|
|
|
import axios from 'axios';
|
|
|
|
|
|
|
|
|
|
|
|
import { trace, trace_collapse ,getImageUrl, toPath} from "educoder";
|
|
|
|
import { trace, trace_collapse ,getImageUrl, toPath} from "educoder";
|
|
|
|
|
|
|
|
|
|
|
|
import RepositoryDirectories from './RepositoryDirectories'
|
|
|
|
import RepositoryDirectories from './RepositoryDirectories';
|
|
|
|
|
|
|
|
|
|
|
|
import { ActionBtn , NoneData } from 'educoder'
|
|
|
|
import { ActionBtn , NoneData } from 'educoder';
|
|
|
|
import RepositoryCombinePath from './RepositoryCombinePath'
|
|
|
|
import RepositoryCombinePath from './RepositoryCombinePath';
|
|
|
|
|
|
|
|
import './Repository.css';
|
|
|
|
const $ = window.$;
|
|
|
|
const $ = window.$;
|
|
|
|
|
|
|
|
|
|
|
|
// 点击按钮复制功能
|
|
|
|
// 点击按钮复制功能
|
|
|
@ -54,58 +47,24 @@ class Repository extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<React.Fragment>
|
|
|
|
<React.Fragment>
|
|
|
|
{/* jfinalshop/WebRoot */}
|
|
|
|
|
|
|
|
{/* <div className="pt30 pl20 pr20 pb30 mb10 clearfix" style={{background: '#fff'}}>
|
|
|
|
|
|
|
|
<span className="fl color-grey-6 font-16 cdefault mt1">
|
|
|
|
|
|
|
|
<i className="iconfont icon-fenzhi fl mr5"></i>
|
|
|
|
|
|
|
|
<span className="fl mt2">分支 1</span>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<a href="https://www.educoder.net/forums/2784" target="_blank"
|
|
|
|
|
|
|
|
className="fr edu-default-btn edu-greenback-btn">Git使用指南</a>
|
|
|
|
|
|
|
|
</div> */}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ repositoryLoading ? <div style={{ minHeight: '500px'}}></div> :
|
|
|
|
{ repositoryLoading ? <div style={{ minHeight: '500px'}}></div> :
|
|
|
|
|
|
|
|
<div className="mb10" id="collaborators_list_info">
|
|
|
|
<div className="" id="collaborators_list_info">
|
|
|
|
|
|
|
|
<div className="clearfix edu-back-white">
|
|
|
|
<div className="clearfix edu-back-white">
|
|
|
|
<div className="padding30-20 clearfix">
|
|
|
|
<div className="padding16-20 clearfix">
|
|
|
|
<div className="fl1 clearfix1 mr201">
|
|
|
|
<div className="fl1 clearfix1 mr201">
|
|
|
|
<div className="repositorytitle">
|
|
|
|
<div className="repositorytitle">
|
|
|
|
{/* <form acceptCharset="UTF-8" action="/shixuns/uznmbg54/repository/uznmbg54"
|
|
|
|
<div className="fl font-12 color-grey-9 pr">
|
|
|
|
id="revision_selector" method="get">
|
|
|
|
<label className="fl Websiteclone">网址克隆:</label>
|
|
|
|
|
|
|
|
<div className={"fl copy_rep_contentbox"}>
|
|
|
|
<div style={{margin:0, padding:0, display:'inline'}}>
|
|
|
|
|
|
|
|
<input name="utf8" type="hidden" value="✓"></input>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<label className="font-16 fl mr5">分支:</label>
|
|
|
|
|
|
|
|
<select className="winput-120-35 fl" id="branch" name="branch" defaultValue="master">
|
|
|
|
|
|
|
|
<option value="master">master</option>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<input id="rev" name="rev" size="8" type="hidden" value=""></input>
|
|
|
|
|
|
|
|
</form> */}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a href="/forums/2784" target="_blank"
|
|
|
|
|
|
|
|
className=" guideBtn" >Git使用指南</a>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?
|
|
|
|
|
|
|
|
!this.props.secret_repository_tab &&
|
|
|
|
|
|
|
|
<ActionBtn style="orangeLine" className="ml20" to={`/shixuns/${match.params.shixunId}/repository/add_file`}>+添加文件</ActionBtn>
|
|
|
|
|
|
|
|
:""
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="fr font-12 color-grey-9 pr">
|
|
|
|
|
|
|
|
<label className="fl mt2">网址克隆:</label>
|
|
|
|
|
|
|
|
<input type="text" id="copy_rep_content" className="fl url-input mt2"
|
|
|
|
<input type="text" id="copy_rep_content" className="fl url-input mt2"
|
|
|
|
defaultValue={ git_url } style={{width: 313}}/>
|
|
|
|
defaultValue={ git_url } style={{width: 313}}/>
|
|
|
|
<a onClick={() => {
|
|
|
|
<a onClick={() => {
|
|
|
|
jsCopy()
|
|
|
|
jsCopy()
|
|
|
|
}} data-tip-down="点击复制版本库地址"
|
|
|
|
}} data-tip-down="点击复制版本库地址"
|
|
|
|
className="fl ml5">
|
|
|
|
className="fl ml5">
|
|
|
|
<i className="iconfont icon-wangzhikelong color-orange-tip" style={{lineHeight: '18px'}}></i>
|
|
|
|
<i className="iconfont icon-fuzhi2 colorbe" style={{lineHeight: '18px'}}></i>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|
{`
|
|
|
|
{`
|
|
|
|
.top-black-trangle {
|
|
|
|
.top-black-trangle {
|
|
|
@ -122,7 +81,7 @@ class Repository extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
#repository_url_tip {
|
|
|
|
#repository_url_tip {
|
|
|
|
top: 30px !important;
|
|
|
|
top: 30px !important;
|
|
|
|
left:132px !important;
|
|
|
|
left:161px !important;
|
|
|
|
width: 292px !important;
|
|
|
|
width: 292px !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`}
|
|
|
|
`}
|
|
|
@ -135,19 +94,19 @@ class Repository extends Component {
|
|
|
|
onClick={() => { $('#repository_url_tip').css('display') === 'none'
|
|
|
|
onClick={() => { $('#repository_url_tip').css('display') === 'none'
|
|
|
|
? $('#repository_url_tip').show()
|
|
|
|
? $('#repository_url_tip').show()
|
|
|
|
: $('#repository_url_tip').hide() }}
|
|
|
|
: $('#repository_url_tip').hide() }}
|
|
|
|
className="fl ml6 mt1">
|
|
|
|
className="fl ml6 mt4">
|
|
|
|
<img src={getImageUrl("images/educoder/problem.png")}/>
|
|
|
|
{/*<img src={getImageUrl("images/educoder/problem.png")}/>*/}
|
|
|
|
|
|
|
|
<i className="iconfont icon-tishi2 colorbe"></i>
|
|
|
|
<div className="invite-tip clearfix none" id="repository_url_tip"
|
|
|
|
<div className="invite-tip clearfix none" id="repository_url_tip"
|
|
|
|
style={{top: '33px', right: '-10px', width: '300px', display: 'none'}}>
|
|
|
|
style={{ width: '300px', display: 'none'}}>
|
|
|
|
<span className="top-black-trangle" style={{"right":"9px"}}></span>
|
|
|
|
<span className="top-black-trangle" style={{"right":"0px"}}></span>
|
|
|
|
<div className="padding20 invitecontent clearfix">
|
|
|
|
<div className="padding16 invitecontent clearfix">
|
|
|
|
<p className="font-12 edu-txt-left">请上传当前实训中各个关卡涉及的所有文件<br/>
|
|
|
|
<p className="font-12 edu-txt-left">请上传当前实训中各个关卡涉及的所有文件<br/>
|
|
|
|
包括任务文件、执行文件,以及其他的必须文件<br/><br/>
|
|
|
|
包括任务文件、执行文件,以及其他的必须文件<br/><br/>
|
|
|
|
提交代码的方法:<br/>
|
|
|
|
提交代码的方法:<br/>
|
|
|
|
1、在电脑上安装Git tortoise客户端,<br/>
|
|
|
|
1、在电脑上安装Git tortoise客户端,或者其它熟悉的Git客户端,在Git客户端上向左侧的地址提交代码<br/>
|
|
|
|
或者其它熟悉的Git客户端<br/>
|
|
|
|
2.直接在平台上新建文件/文件夹,或者拖拽上传相关代码文件<br/><br/>
|
|
|
|
2、在Git客户端上向左侧的地址提交代码<br/><br/>
|
|
|
|
注意:<br/>
|
|
|
|
注意:<br/>
|
|
|
|
|
|
|
|
请在Git客户端要求填写时,按照如下说明填写:<br/>
|
|
|
|
请在Git客户端要求填写时,按照如下说明填写:<br/>
|
|
|
|
* 用户名:使用您在本平台绑定的邮箱<br/>
|
|
|
|
* 用户名:使用您在本平台绑定的邮箱<br/>
|
|
|
|
* 口令:使用您在本平台的登录口令
|
|
|
|
* 口令:使用您在本平台的登录口令
|
|
|
@ -159,6 +118,14 @@ class Repository extends Component {
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?
|
|
|
|
|
|
|
|
!this.props.secret_repository_tab &&
|
|
|
|
|
|
|
|
<ActionBtn style="orangeLine" className="ml20 fr" to={`/shixuns/${match.params.shixunId}/repository/add_file`}>+添加文件</ActionBtn>
|
|
|
|
|
|
|
|
:""
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{this.props.secret_repository_tab && <RepositoryCombinePath {...this.props}>
|
|
|
|
{this.props.secret_repository_tab && <RepositoryCombinePath {...this.props}>
|
|
|
@ -221,14 +188,15 @@ class Repository extends Component {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{/* 当前分支的文件 */}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
<a href="/forums/2784" target="_blank"
|
|
|
|
|
|
|
|
className=" guideBtn" >Git使用指南</a>
|
|
|
|
|
|
|
|
{/* 当前分支的文件 */}
|
|
|
|
</React.Fragment>
|
|
|
|
</React.Fragment>
|
|
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|