版本库调整

dev_new_shixunsrepository
杨树明 5 years ago
parent 827d8b568c
commit a74a564314

@ -0,0 +1,27 @@
.copy_rep_contentbox{
width: 360px;
background: rgba(250,250,250,1);
border-radius: 4px;
padding: 10px;
}
#copy_rep_content{
background: rgba(250,250,250,1);
}
.padding16-20{
padding: 16px 20px;
box-sizing: border-box;
}
.Websiteclone{
font-size: 14px;
font-family: MicrosoftYaHei;
color: rgba(51,51,51,1);
line-height: 40px;
}
.colorbe{
color:#bebebe
}
.padding16{
padding: 16px;
box-sizing: border-box;
}

@ -1,21 +1,14 @@
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 { trace, trace_collapse ,getImageUrl, toPath} from "educoder";
import RepositoryDirectories from './RepositoryDirectories'
import RepositoryDirectories from './RepositoryDirectories';
import { ActionBtn , NoneData } from 'educoder'
import RepositoryCombinePath from './RepositoryCombinePath'
import { ActionBtn , NoneData } from 'educoder';
import RepositoryCombinePath from './RepositoryCombinePath';
import './Repository.css';
const $ = window.$;
// 点击按钮复制功能
@ -54,58 +47,24 @@ class Repository extends Component {
}
return (
<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">分支&nbsp;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> :
<div className="" id="collaborators_list_info">
<div className="mb10" id="collaborators_list_info">
<div className="clearfix edu-back-white">
<div className="padding30-20 clearfix">
<div className="padding16-20 clearfix">
<div className="fl1 clearfix1 mr201">
<div className="repositorytitle">
{/* <form acceptCharset="UTF-8" action="/shixuns/uznmbg54/repository/uznmbg54"
id="revision_selector" method="get">
<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>
<div className="fl font-12 color-grey-9 pr">
<label className="fl Websiteclone">网址克隆</label>
<div className={"fl copy_rep_contentbox"}>
<input type="text" id="copy_rep_content" className="fl url-input mt2"
defaultValue={ git_url } style={{width: 313}}/>
<a onClick={() => {
jsCopy()
}} data-tip-down="点击复制版本库地址"
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>
</div>
<style>
{`
.top-black-trangle {
@ -122,7 +81,7 @@ class Repository extends Component {
#repository_url_tip {
top: 30px !important;
left:132px !important;
left:161px !important;
width: 292px !important;
}
`}
@ -135,19 +94,19 @@ class Repository extends Component {
onClick={() => { $('#repository_url_tip').css('display') === 'none'
? $('#repository_url_tip').show()
: $('#repository_url_tip').hide() }}
className="fl ml6 mt1">
<img src={getImageUrl("images/educoder/problem.png")}/>
className="fl ml6 mt4">
{/*<img src={getImageUrl("images/educoder/problem.png")}/>*/}
<i className="iconfont icon-tishi2 colorbe"></i>
<div className="invite-tip clearfix none" id="repository_url_tip"
style={{top: '33px', right: '-10px', width: '300px', display: 'none'}}>
<span className="top-black-trangle" style={{"right":"9px"}}></span>
<div className="padding20 invitecontent clearfix">
style={{ width: '300px', display: 'none'}}>
<span className="top-black-trangle" style={{"right":"0px"}}></span>
<div className="padding16 invitecontent clearfix">
<p className="font-12 edu-txt-left">请上传当前实训中各个关卡涉及的所有文件<br/>
包括任务文件执行文件以及其他的必须文件<br/><br/>
提交代码的方法<br/>
1在电脑上安装Git tortoise客户端<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;或者其它熟悉的Git客户端<br/>
2在Git客户端上向左侧的地址提交代码<br/><br/>
注意<br/>
1在电脑上安装Git tortoise客户端或者其它熟悉的Git客户端,在Git客户端上向左侧的地址提交代码<br/>
2.直接在平台上新建文件/文件夹或者拖拽上传相关代码文件<br/><br/>
注意:<br/>
请在Git客户端要求填写时按照如下说明填写<br/>
* 用户名使用您在本平台绑定的邮箱<br/>
* 口令使用您在本平台的登录口令
@ -159,6 +118,14 @@ class Repository extends Component {
</a>
</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>
{this.props.secret_repository_tab && <RepositoryCombinePath {...this.props}>
@ -221,14 +188,15 @@ class Repository extends Component {
</div>
</div>
</div>
</div>
}
{/* 当前分支的文件 */}
</div>
</div>
}
<a href="/forums/2784" target="_blank"
className=" guideBtn" >Git使用指南</a>
{/* 当前分支的文件 */}
</React.Fragment>
);

Loading…
Cancel
Save