forked from Gitlink/forgeplus-react
目录选择img
This commit is contained in:
parent
cdff82f74b
commit
0d8012c73c
|
|
@ -466,20 +466,18 @@ class CoderRootDirectory extends Component {
|
|||
{subFileType && (isManager || isDeveloper) && (
|
||||
<div>
|
||||
<span>
|
||||
<Button
|
||||
type="link"
|
||||
href={`/projects/${projectsId}/coders/${branch}/uploadfile${urlRoot}`}
|
||||
<Link
|
||||
to={`/projects/${projectsId}/coders/${branch}/uploadfile${urlRoot}`}
|
||||
>
|
||||
<span className="color-green">上传文件</span>
|
||||
</Button>
|
||||
<span className="color-green mr30">上传文件</span>
|
||||
</Link>
|
||||
</span>
|
||||
<span className="mr30">
|
||||
<Button
|
||||
type="link"
|
||||
href={`/projects/${projectsId}/coders/${branch}/newfile${urlRoot}`}
|
||||
<Link
|
||||
to={`/projects/${projectsId}/coders/${branch}/newfile${urlRoot}`}
|
||||
>
|
||||
<span className="color-blue">新建文件</span>
|
||||
</Button>
|
||||
</Link>
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -78,28 +78,7 @@ class CoderRootFileDetail extends Component {
|
|||
});
|
||||
};
|
||||
|
||||
// // 确认修改文件
|
||||
// UpdateFile=()=>{
|
||||
// const { branch , detail}= this.props;
|
||||
// const { projectsId } = this.props.match.params;
|
||||
// const { value } = this.state;
|
||||
// const url =`/repositories/${projectsId}/update_file.json`;
|
||||
// axios.put(url,{
|
||||
// filepath:detail.path,
|
||||
// branch,
|
||||
// content:value,
|
||||
// sha:detail.sha,
|
||||
// }).then(result=>{
|
||||
// if(result){
|
||||
// this.props.showNotification("修改成功!");
|
||||
// this.setState({
|
||||
// readOnly:true
|
||||
// })
|
||||
// }
|
||||
// }).catch(error=>{
|
||||
// console.log(error);
|
||||
// })
|
||||
// }
|
||||
|
||||
updateCode = (value) => {
|
||||
this.setState({
|
||||
value,
|
||||
|
|
@ -197,8 +176,6 @@ class CoderRootFileDetail extends Component {
|
|||
>
|
||||
<span>取 消</span>
|
||||
</button>
|
||||
{/* <button type="button" className="ant-btn ant-btn-primary ant-btn-sm" onClick={this.UpdateFile}><span>确 定</span>
|
||||
</button> */}
|
||||
</React.Fragment>
|
||||
)}
|
||||
|
||||
|
|
@ -215,14 +192,20 @@ class CoderRootFileDetail extends Component {
|
|||
</Popconfirm>
|
||||
</div>
|
||||
)}
|
||||
{
|
||||
detail.image_type && detail.direct_download ?
|
||||
<div className="ml20">
|
||||
<a href={detail.download_url} className="color-blue font-15">
|
||||
下载原始文件
|
||||
</a>
|
||||
</div>:""
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
{detail.direct_download ? (
|
||||
<div className="text-center">
|
||||
<a href={detail.download_url} className="color-blue font-15">
|
||||
下载原始文件
|
||||
</a>
|
||||
{detail.image_type && detail.direct_download ? (
|
||||
<div className="edu-txt-center pt20 pb20">
|
||||
<img alt="" src={detail.download_url} style={{maxWidth:"80%"}}/>
|
||||
</div>
|
||||
) : (
|
||||
<Meditor
|
||||
|
|
|
|||
|
|
@ -309,7 +309,8 @@ class Detail extends Component {
|
|||
const { projectsId } = this.props.match.params;
|
||||
|
||||
const { state } = this.props.history.location;
|
||||
|
||||
const { current_user } = this.props;
|
||||
const checkLogin = current_user && current_user.login;
|
||||
const text = (
|
||||
projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ?
|
||||
<React.Fragment>
|
||||
|
|
@ -354,7 +355,7 @@ class Detail extends Component {
|
|||
</Tooltip> : ""
|
||||
}
|
||||
{
|
||||
projectDetail && projectDetail.type && projectDetail.type === 2 ?
|
||||
projectDetail && checkLogin && projectDetail.type && projectDetail.type === 2 ?
|
||||
<Tooltip placement={'right'} title={mirror}>
|
||||
<i className="iconfont icon-jingxiang font-18 fl mt6 ml10" style={{ color: "#8D90E3" }}></i>
|
||||
</Tooltip>:""
|
||||
|
|
@ -383,7 +384,6 @@ class Detail extends Component {
|
|||
<Link className="detail_tag_btn_count" to={{pathname:`/projects/${projectsId}/praise_users`,state}}>
|
||||
{praises_count}
|
||||
</Link>
|
||||
{/* <span className="detail_tag_btn_count">{praises_count}</span> */}
|
||||
</span>
|
||||
<span className="detail_tag_btn">
|
||||
<a className="detail_tag_btn_name" onClick={this.forkFunc}>
|
||||
|
|
@ -391,7 +391,6 @@ class Detail extends Component {
|
|||
<Link className="detail_tag_btn_count" to={{pathname:`/projects/${projectsId}/fork_users`,state}}>
|
||||
{forked_count}
|
||||
</Link>
|
||||
{/* <span className="detail_tag_btn_count">{forked_count}</span> */}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -415,13 +414,6 @@ class Detail extends Component {
|
|||
{ projectDetail && projectDetail.pull_requests_count ? <span>{projectDetail.issues_count}</span> : "" }
|
||||
</Link>
|
||||
</li>
|
||||
{/* <li className={url.indexOf("version") > -1 ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${projectsId}/version`, state }}>
|
||||
<img alt="" src={img_4} width="16" />版本发布
|
||||
{projectDetail && projectDetail.version_releases_count && <span>{projectDetail.version_releases_count}</span>}
|
||||
</Link>
|
||||
</li> */}
|
||||
|
||||
<li className={(url.indexOf("Milepost") > -1 || url.indexOf("meilpost") > -1) ? "active" : ""}>
|
||||
<Link to={{ pathname: `/projects/${projectsId}/orders/Milepost`, state }}>
|
||||
<img alt="" src={img_milepost} width="16" />里程碑
|
||||
|
|
|
|||
Loading…
Reference in New Issue