|
|
@ -1,7 +1,7 @@
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
import {getImageUrl} from "educoder";
|
|
|
|
import {getImageUrl} from "educoder";
|
|
|
|
import RepositoryDirectories from './RepositoryDirectories';
|
|
|
|
import RepositoryDirectories from './RepositoryDirectories';
|
|
|
|
import { Button ,Tree,Icon,Modal} from "antd";
|
|
|
|
import { Button ,Tree,Icon,Modal,Tooltip} from "antd";
|
|
|
|
import axios from 'axios';
|
|
|
|
import axios from 'axios';
|
|
|
|
import {Link} from 'react-router-dom';
|
|
|
|
import {Link} from 'react-router-dom';
|
|
|
|
import RepositoryCombinePath from './RepositoryCombinePath';
|
|
|
|
import RepositoryCombinePath from './RepositoryCombinePath';
|
|
|
@ -202,12 +202,12 @@ class Repository extends Component {
|
|
|
|
<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: 266}}/>
|
|
|
|
defaultValue={ git_url } style={{width: 266}}/>
|
|
|
|
<a onClick={() => {
|
|
|
|
<Tooltip placement="topLeft" title={"点击复制版本库"}>
|
|
|
|
jsCopy()
|
|
|
|
<a onClick={() => {jsCopy()}} className="fl ml5">
|
|
|
|
}} data-tip-down="点击复制版本库地址"
|
|
|
|
<i className="iconfont icon-fuzhi2 colorbe" style={{lineHeight: '18px'}}></i>
|
|
|
|
className="fl ml5">
|
|
|
|
</a>
|
|
|
|
<i className="iconfont icon-fuzhi2 colorbe" style={{lineHeight: '18px'}}></i>
|
|
|
|
</Tooltip>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|
{`
|
|
|
|
{`
|
|
|
@ -225,7 +225,7 @@ class Repository extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
#repository_url_tip {
|
|
|
|
#repository_url_tip {
|
|
|
|
top: 30px !important;
|
|
|
|
top: 30px !important;
|
|
|
|
left:161px !important;
|
|
|
|
left:111px !important;
|
|
|
|
width: 292px !important;
|
|
|
|
width: 292px !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`}
|
|
|
|
`}
|
|
|
@ -321,7 +321,7 @@ class Repository extends Component {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
trees === undefined || trees === null ||trees.length===0? <RepositoryNoneData></RepositoryNoneData>:
|
|
|
|
trees === undefined || trees === null ||trees.length===0? <RepositoryNoneData></RepositoryNoneData>:
|
|
|
|
<div className={"padding020Repository"}>
|
|
|
|
<div className={"padding020Repository"}>
|
|
|
|
{commits===undefined?"":commits===null||commits.length===0?"":<div className=" padding10-20 clearfix height7052pxRepositor borbotF4">
|
|
|
|
{commits===undefined?"":commits===null||commits.length===0?"":<div className="padding0-12 clearfix height7052pxRepositor borbotF4">
|
|
|
|
<img alt={author.name} className="radius fl mr10 mt5"
|
|
|
|
<img alt={author.name} className="radius fl mr10 mt5"
|
|
|
|
height="35"
|
|
|
|
height="35"
|
|
|
|
src={getImageUrl(`images/`+commits[0].author.image_url)}
|
|
|
|
src={getImageUrl(`images/`+commits[0].author.image_url)}
|
|
|
@ -340,7 +340,9 @@ class Repository extends Component {
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
</div>}
|
|
|
|
</div>}
|
|
|
|
|
|
|
|
|
|
|
|
<div className="padding20" style={{minHeight: '372px'}}>
|
|
|
|
|
|
|
|
|
|
|
|
{/*className="padding20" */}
|
|
|
|
|
|
|
|
<div style={{minHeight: '372px'}}>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
{/* 当前目录位置 */}
|
|
|
|
{/* 当前目录位置 */}
|
|
|
|
<div className={"mb10"}>
|
|
|
|
<div className={"mb10"}>
|
|
|
@ -364,10 +366,29 @@ class Repository extends Component {
|
|
|
|
{/* })}*/}
|
|
|
|
{/* })}*/}
|
|
|
|
{/*</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.current_user && (this.props.current_user.admin ==true || (TPMRightSectionData && TPMRightSectionData.creator && TPMRightSectionData.creator.login == this.props.current_user.login)) ?*/}
|
|
|
|
<Button size={"small"} className={"fr"} type="link" onClick={this.showDeleteConfirm}><Icon type="delete" /></Button>:""}
|
|
|
|
{/* <Button size={"small"} className={"fr"} type="link" onClick={this.showDeleteConfirm}><Icon type="delete" /></Button>:""}*/}
|
|
|
|
<div className={"both"}></div>
|
|
|
|
{/*<div className={"both"}></div>*/}
|
|
|
|
<DirectoryTree multiple defaultExpandAll checkable onSelect={this.onSelectDirectoryTree} onCheck={this.onCheck}>
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
`
|
|
|
|
|
|
|
|
.reposanttreeswitcher .ant-tree-switcher{
|
|
|
|
|
|
|
|
display: none !important;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DirectoryTree
|
|
|
|
|
|
|
|
className={"reposanttreeswitcher"}
|
|
|
|
|
|
|
|
// multiple
|
|
|
|
|
|
|
|
defaultExpandAll
|
|
|
|
|
|
|
|
// checkable
|
|
|
|
|
|
|
|
onSelect={this.onSelectDirectoryTree}
|
|
|
|
|
|
|
|
// onCheck={this.onCheck}
|
|
|
|
|
|
|
|
>
|
|
|
|
{ trees === undefined ?"": trees === null || trees.length===0?"":trees.map((item, index) => {
|
|
|
|
{ trees === undefined ?"": trees === null || trees.length===0?"":trees.map((item, index) => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<TreeNode disableCheckbox={this.state.ischeckevalue===item.name?false:this.state.ischecke?true:item.type==='tree'?true:false} item={item} title={`${item.name}`} key={item.type==='tree'?"0-0":`0-0-${index}`} icon={item.type==='tree'?<i className="iconfont icon-xingzhuangjiehebeifen color-blue font-12" />:<i className="iconfont icon-xingzhuangjiehe color-blue font-12"/>} id={`file${index}`} key={index}>
|
|
|
|
<TreeNode disableCheckbox={this.state.ischeckevalue===item.name?false:this.state.ischecke?true:item.type==='tree'?true:false} item={item} title={`${item.name}`} key={item.type==='tree'?"0-0":`0-0-${index}`} icon={item.type==='tree'?<i className="iconfont icon-xingzhuangjiehebeifen color-blue font-12" />:<i className="iconfont icon-xingzhuangjiehe color-blue font-12"/>} id={`file${index}`} key={index}>
|
|
|
|