|
|
|
@ -47,6 +47,9 @@ class Repository extends Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onSelectDirectoryTree=(selectedKeys, info)=>{
|
|
|
|
|
this.onRepoFileClick(info.node.props.item)
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let { match, author, git_url, lastest_commit,repositoryLoading, commits,trees,pathArray , TPMRightSectionData } = this.props;
|
|
|
|
|
let matchpath =this.props.match.path;
|
|
|
|
@ -222,33 +225,34 @@ class Repository extends Component {
|
|
|
|
|
</div>}
|
|
|
|
|
|
|
|
|
|
<div className="padding20" style={{minHeight: '372px'}}>
|
|
|
|
|
<div className="bor-grey-e">
|
|
|
|
|
<div>
|
|
|
|
|
{/* 当前目录位置 */}
|
|
|
|
|
<RepositoryDirectories {...this.props}></RepositoryDirectories>
|
|
|
|
|
|
|
|
|
|
<div className="versionFileList">
|
|
|
|
|
{/*<div className="versionFileList">*/}
|
|
|
|
|
{/* { trees === undefined ?"": trees === null || trees.length===0?"":trees.map((item, index) => {*/}
|
|
|
|
|
{/* return (*/}
|
|
|
|
|
{/* <li id={`file${index}`} key={index} className=" file padding5-10">*/}
|
|
|
|
|
{/* <span style={{marginLeft: '0px'}} className="task-hide">*/}
|
|
|
|
|
{/* <i className={`${item.type === 'tree' ? 'icon-wenjianjia' : 'icon-zuoye'}*/}
|
|
|
|
|
{/* iconfont color-blue`}></i>*/}
|
|
|
|
|
{/* <a*/}
|
|
|
|
|
{/* onClick={() => this.onRepoFileClick(item)}>*/}
|
|
|
|
|
{/* {item.name}*/}
|
|
|
|
|
{/* </a>*/}
|
|
|
|
|
{/* </span>*/}
|
|
|
|
|
{/* </li>*/}
|
|
|
|
|
{/* )*/}
|
|
|
|
|
{/* })}*/}
|
|
|
|
|
{/*</div>*/}
|
|
|
|
|
|
|
|
|
|
<DirectoryTree multiple defaultExpandAll onSelect={this.onSelectDirectoryTree}>
|
|
|
|
|
{ trees === undefined ?"": trees === null || trees.length===0?"":trees.map((item, index) => {
|
|
|
|
|
return (
|
|
|
|
|
<li id={`file${index}`} key={index} className=" file padding5-10">
|
|
|
|
|
<span style={{marginLeft: '0px'}} className="task-hide">
|
|
|
|
|
<i className={`${item.type === 'tree' ? 'icon-wenjianjia' : 'icon-zuoye'}
|
|
|
|
|
iconfont color-blue`}></i>
|
|
|
|
|
<a
|
|
|
|
|
onClick={() => this.onRepoFileClick(item)}>
|
|
|
|
|
{item.name}
|
|
|
|
|
</a>
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/*<DirectoryTree multiple defaultExpandAll onSelect={this.onSelect} onExpand={this.onExpand}>*/}
|
|
|
|
|
{/* <TreeNode title="parent 0" key="0-0" icon={<i className="iconfont icon-xingzhuangjiehebeifen color-blue font-12" />}>*/}
|
|
|
|
|
{/* <TreeNode title="leaf 0-0" key="0-0-0" isLeaf icon={<i className="iconfont icon-xingzhuangjiehe color-blue font-12" />} />*/}
|
|
|
|
|
{/* <TreeNode title="leaf 0-1" key="0-0-1" isLeaf icon={<i className="iconfont icon-xingzhuangjiehe color-blue font-12" />}/>*/}
|
|
|
|
|
{/* </TreeNode>*/}
|
|
|
|
|
{/*</DirectoryTree>*/}
|
|
|
|
|
<TreeNode 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>
|
|
|
|
|
)})}
|
|
|
|
|
</DirectoryTree>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|