|
|
@ -5,8 +5,8 @@ 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 { Button } from "antd";
|
|
|
|
import { ActionBtn , NoneData } from 'educoder';
|
|
|
|
import {Link} from 'react-router-dom';
|
|
|
|
import RepositoryCombinePath from './RepositoryCombinePath';
|
|
|
|
import RepositoryCombinePath from './RepositoryCombinePath';
|
|
|
|
import RepositoryNoneData from './RepositoryNoneData';
|
|
|
|
import RepositoryNoneData from './RepositoryNoneData';
|
|
|
|
import './Repository.css';
|
|
|
|
import './Repository.css';
|
|
|
@ -58,7 +58,7 @@ class Repository extends Component {
|
|
|
|
<label className="fl Websiteclone">网址克隆:</label>
|
|
|
|
<label className="fl Websiteclone">网址克隆:</label>
|
|
|
|
<div className={"fl copy_rep_contentbox"}>
|
|
|
|
<div className={"fl copy_rep_contentbox"}>
|
|
|
|
<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: 266}}/>
|
|
|
|
<a onClick={() => {
|
|
|
|
<a onClick={() => {
|
|
|
|
jsCopy()
|
|
|
|
jsCopy()
|
|
|
|
}} data-tip-down="点击复制版本库地址"
|
|
|
|
}} data-tip-down="点击复制版本库地址"
|
|
|
@ -123,7 +123,24 @@ class Repository extends Component {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.props.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?
|
|
|
|
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 &&
|
|
|
|
!this.props.secret_repository_tab &&
|
|
|
|
<ActionBtn style="orangeLine" className="ml20 fr" to={`/shixuns/${match.params.shixunId}/repository/add_file`}>+添加文件</ActionBtn>
|
|
|
|
(
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<Button type="primary"
|
|
|
|
|
|
|
|
className="edu-default-btn edu-greenback-btn mt5 fr"
|
|
|
|
|
|
|
|
>新建文件夹</Button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Link to={`/shixuns/${match.params.shixunId}/repository/add_file`}>
|
|
|
|
|
|
|
|
<Button type="primary"
|
|
|
|
|
|
|
|
className="edu-default-btn edu-greenback-btn mt5 mr10 fr"
|
|
|
|
|
|
|
|
>新建文件</Button>
|
|
|
|
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Button type="primary"
|
|
|
|
|
|
|
|
className="edu-default-btn edu-greenback-btn mt5 mr10 fr"
|
|
|
|
|
|
|
|
>上传文件</Button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
:""
|
|
|
|
:""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -146,13 +163,13 @@ class Repository extends Component {
|
|
|
|
{/* 用户、最近提交时间 */}
|
|
|
|
{/* 用户、最近提交时间 */}
|
|
|
|
{
|
|
|
|
{
|
|
|
|
trees === undefined || trees === null ||trees.length===0? <RepositoryNoneData></RepositoryNoneData>:
|
|
|
|
trees === undefined || trees === null ||trees.length===0? <RepositoryNoneData></RepositoryNoneData>:
|
|
|
|
<div>
|
|
|
|
<div className={"padding020Repository"}>
|
|
|
|
{commits===undefined?"":commits===null||commits.length===0?"":<div className="edu-back-skyblue padding10-20 clearfix">
|
|
|
|
{commits===undefined?"":commits===null||commits.length===0?"":<div className=" padding10-20 clearfix height7052pxRepositor borbotF4">
|
|
|
|
<img alt={author.name} className="radius fl mr10"
|
|
|
|
<img alt={author.name} className="radius fl mr10 mt10"
|
|
|
|
height="30"
|
|
|
|
height="35"
|
|
|
|
src={getImageUrl(`images/`+commits[0].author.image_url)}
|
|
|
|
src={getImageUrl(`images/`+commits[0].author.image_url)}
|
|
|
|
style={{display:userauthority===true?"none":"block"}}
|
|
|
|
style={{display:userauthority===true?"none":"block"}}
|
|
|
|
width="30"/>
|
|
|
|
width="35"/>
|
|
|
|
<a href={author.user_url} className="mr5 va_sub" target="_blank">{commits[0].author.name}</a>
|
|
|
|
<a href={author.user_url} className="mr5 va_sub" target="_blank">{commits[0].author.name}</a>
|
|
|
|
<span className="color-grey-6 va_sub">提交于
|
|
|
|
<span className="color-grey-6 va_sub">提交于
|
|
|
|
<acronym title={commits[0].time}>
|
|
|
|
<acronym title={commits[0].time}>
|
|
|
|