项目详情和个人中心的项目列表,增加私有标识

This commit is contained in:
caishi 2021-06-16 11:17:46 +08:00
parent 5806f60491
commit f4b3afde6a
4 changed files with 52 additions and 30 deletions

View File

@ -3908,6 +3908,17 @@ html>body #ajax-indicator {
max-height: 340px; max-height: 340px;
}/*头部导航条样式---2018-03-19--by-cs*/ }/*头部导航条样式---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 { .head-nav {
text-align: center; text-align: center;
height: 70px; height: 70px;

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react'; 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 { 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 DetailBanner from './sub/DetailBanner';
import Invite from './sub/Invite'; import Invite from './sub/Invite';
import '../css/index.scss' import '../css/index.scss'
@ -425,17 +425,16 @@ class Detail extends Component {
<div> <div>
<div className="detailHeader-wrapper"> <div className="detailHeader-wrapper">
<div className="normal"> <div className="normal">
<div className="f-wrap-between" style={{ position: "relative" }}> <FlexAJ style={{marginTop:"15px"}}>
<p className="font-22 df flex-1 lineH2 mt15" style={{ alignItems: "center" }}> <AlignCenter>
<div className="projectallName">
{project && project.author && {project && project.author &&
<Link to={`${project.author.type ==="Organization" ? "/organize":'/users'}/${project.author.login}`} className="show-user-link"> <Link to={`${project.author.type ==="Organization" ? "/organize":'/users'}/${project.author.login}`}>{project.author.name}</Link>
{project.author.name}
</Link>
} }
<span className="ml5 mr5">/</span> <span className="ml5 mr5">/</span>
<span className="hide-1 flex-1 df"> <Link to={`/projects/${owner}/${projectsId}`} className="projectN">{project && project.name}</Link>
<Link to={`/projects/${owner}/${projectsId}`} className="font-22">{project && project.name}</Link> </div>
{ projectDetail && projectDetail.private && <span className="privateTag">私有</span>}
{ {
projectDetail && projectDetail.type && projectDetail.type !== 0 ? projectDetail && projectDetail.type && projectDetail.type !== 0 ?
projectDetail.type === 2 ? projectDetail.type === 2 ?
@ -448,11 +447,10 @@ class Detail extends Component {
</Tooltip> </Tooltip>
:"" :""
} }
</span> </AlignCenter>
</p>
{ {
firstSync ? "": firstSync ? "":
<span className="df mt25"> <span className="df">
{ {
((current_user && current_user.admin) || isManager) && (projectDetail && projectDetail.type && projectDetail.type === 2) ? ((current_user && current_user.admin) || isManager) && (projectDetail && projectDetail.type && projectDetail.type === 2) ?
<a className="synchronism ml30" onClick={this.synchronismMirror}>同步镜像</a> : "" <a className="synchronism ml30" onClick={this.synchronismMirror}>同步镜像</a> : ""
@ -507,7 +505,7 @@ class Detail extends Component {
</span> </span>
</span> </span>
} }
</div> </FlexAJ>
<FlexAJ> <FlexAJ>
<div> <div>
{ {

View File

@ -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 // coderDepot
.Panels{ .Panels{
max-width: 1200px; max-width: 1200px;

View File

@ -35,9 +35,10 @@ class IndexItem extends Component {
<div className="p-r-Infos"> <div className="p-r-Infos">
<div className="p-r-name"> <div className="p-r-name">
<AlignCenter> <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} {item.author.name}/{item.name}
</Link> </Link>
{ !item.is_public && <span className="privateTag">私有</span> }
{ {
item.forked_from_project_id ? item.forked_from_project_id ?
<span className="ml5"> <span className="ml5">