forked from Gitlink/forgeplus-react
项目详情和个人中心的项目列表,增加私有标识
This commit is contained in:
parent
5806f60491
commit
f4b3afde6a
|
@ -3908,6 +3908,17 @@ html>body #ajax-indicator {
|
|||
max-height: 340px;
|
||||
}/*头部导航条样式---2018-03-19--by-cs*/
|
||||
|
||||
.privateTag{
|
||||
display: block;
|
||||
padding:0px 6px;
|
||||
border-radius: 12px;
|
||||
border:1px solid #2FC25B;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
font-size: 12px;
|
||||
margin-left: 10px;
|
||||
color: #2FC25B;
|
||||
}
|
||||
.head-nav {
|
||||
text-align: center;
|
||||
height: 70px;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Spin, Tooltip , message } from 'antd';
|
||||
import { Spin, Tooltip } from 'antd';
|
||||
import { Link, Route, Switch } from 'react-router-dom';
|
||||
import { Content , FlexAJ } from '../Component/layout';
|
||||
import { Content , FlexAJ , AlignCenter } from '../Component/layout';
|
||||
import DetailBanner from './sub/DetailBanner';
|
||||
import Invite from './sub/Invite';
|
||||
import '../css/index.scss'
|
||||
|
@ -425,34 +425,32 @@ class Detail extends Component {
|
|||
<div>
|
||||
<div className="detailHeader-wrapper">
|
||||
<div className="normal">
|
||||
<div className="f-wrap-between" style={{ position: "relative" }}>
|
||||
<p className="font-22 df flex-1 lineH2 mt15" style={{ alignItems: "center" }}>
|
||||
{project && project.author &&
|
||||
<Link to={`${project.author.type ==="Organization" ? "/organize":'/users'}/${project.author.login}`} className="show-user-link">
|
||||
{project.author.name}
|
||||
</Link>
|
||||
}
|
||||
<span className="ml5 mr5">/</span>
|
||||
<span className="hide-1 flex-1 df">
|
||||
<Link to={`/projects/${owner}/${projectsId}`} className="font-22">{project && project.name}</Link>
|
||||
|
||||
{
|
||||
projectDetail && projectDetail.type && projectDetail.type !== 0 ?
|
||||
projectDetail.type === 2 ?
|
||||
<Tooltip title={"镜像自: " + projectDetail.mirror_url} className="ml5" placement={'right'}>
|
||||
<i className="iconfont icon-banbenku font-18 mt6" style={{ color: "#8D90E3" }}/>
|
||||
</Tooltip>
|
||||
:
|
||||
<Tooltip title={"镜像自: " + projectDetail.mirror_url} className="ml5" placement={'right'}>
|
||||
<i className="iconfont icon-jingxiang font-18 color-green mt6" />
|
||||
</Tooltip>
|
||||
:""
|
||||
<FlexAJ style={{marginTop:"15px"}}>
|
||||
<AlignCenter>
|
||||
<div className="projectallName">
|
||||
{project && project.author &&
|
||||
<Link to={`${project.author.type ==="Organization" ? "/organize":'/users'}/${project.author.login}`}>{project.author.name}</Link>
|
||||
}
|
||||
</span>
|
||||
</p>
|
||||
<span className="ml5 mr5">/</span>
|
||||
<Link to={`/projects/${owner}/${projectsId}`} className="projectN">{project && project.name}</Link>
|
||||
</div>
|
||||
{ projectDetail && projectDetail.private && <span className="privateTag">私有</span>}
|
||||
{
|
||||
projectDetail && projectDetail.type && projectDetail.type !== 0 ?
|
||||
projectDetail.type === 2 ?
|
||||
<Tooltip title={"镜像自: " + projectDetail.mirror_url} className="ml5" placement={'right'}>
|
||||
<i className="iconfont icon-banbenku font-18 mt6" style={{ color: "#8D90E3" }}/>
|
||||
</Tooltip>
|
||||
:
|
||||
<Tooltip title={"镜像自: " + projectDetail.mirror_url} className="ml5" placement={'right'}>
|
||||
<i className="iconfont icon-jingxiang font-18 color-green mt6" />
|
||||
</Tooltip>
|
||||
:""
|
||||
}
|
||||
</AlignCenter>
|
||||
{
|
||||
firstSync ? "":
|
||||
<span className="df mt25">
|
||||
<span className="df">
|
||||
{
|
||||
((current_user && current_user.admin) || isManager) && (projectDetail && projectDetail.type && projectDetail.type === 2) ?
|
||||
<a className="synchronism ml30" onClick={this.synchronismMirror}>同步镜像</a> : ""
|
||||
|
@ -507,7 +505,7 @@ class Detail extends Component {
|
|||
</span>
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
</FlexAJ>
|
||||
<FlexAJ>
|
||||
<div>
|
||||
{
|
||||
|
|
|
@ -102,7 +102,19 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.projectallName{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 22px;
|
||||
font-weight: normal;
|
||||
.projectN{
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
flex: 1;
|
||||
max-width: 500px;
|
||||
}
|
||||
}
|
||||
// coderDepot
|
||||
.Panels{
|
||||
max-width: 1200px;
|
||||
|
|
|
@ -35,9 +35,10 @@ class IndexItem extends Component {
|
|||
<div className="p-r-Infos">
|
||||
<div className="p-r-name">
|
||||
<AlignCenter>
|
||||
<Link to={`/projects/${item.author.login}/${item.identifier}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 490 }}>
|
||||
<Link to={`/projects/${item.author.login}/${item.identifier}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 470 }}>
|
||||
{item.author.name}/{item.name}
|
||||
</Link>
|
||||
{ !item.is_public && <span className="privateTag">私有</span> }
|
||||
{
|
||||
item.forked_from_project_id ?
|
||||
<span className="ml5">
|
||||
|
|
Loading…
Reference in New Issue