save style

This commit is contained in:
caishi 2023-02-28 18:24:11 +08:00
parent 942c63964d
commit 3b25249b24
4 changed files with 69 additions and 64 deletions

View File

@ -14,7 +14,7 @@ function Datas({checkbox ,item , projectsId,owner}){
case "低":
return "status low";
case "正常":
return "status normal";
return "status normals";
case "高":
return "status hight";
default:
@ -31,32 +31,34 @@ function Datas({checkbox ,item , projectsId,owner}){
<div>
<div className="issuedetail">
{checkbox}
<div className="ilog">
<span className={statusTag(item.priority_name)}>{item.priority_name}</span>
{ item.project_issues_index &&
<Copy value={`/${owner}/${projectsId}/issues/${item.project_issues_index}`}><span className="number">#{item.project_issues_index}</span></Copy>
}
</div>
<div style={{marginTop:"-2px"}}>
<div style={{flex:1}}>
<div className="idetails mt2">
{/* <img src={issue} alt="" width="16px" className="mr5" /> */}
<Link to={`/${owner}/${projectsId}/issues/${item.project_issues_index}`} title={item.subject}>{item.subject}</Link>
{
item.tags && item.tags.length>0?
item.tags.map((i,k)=>{
return(
<span style={{borderColor: `${i.color}`,color: `${i.color}`}} className="ml12 tagscolor task-hide" title={i.name}>{i.name}</span>
)
})
:""
}
<span className={statusTag(item.priority_name)}>{item.priority_name}</span>
{/* <img src={issue} alt="" width="16px" className="mr5" /> */}
<Link to={`/${owner}/${projectsId}/issues/${item.project_issues_index}`} title={item.subject}>{item.subject}</Link>
{
item.tags && item.tags.length>0?
item.tags.map((i,k)=>{
return(
<span style={{borderColor: `${i.color}`,color: `${i.color}`}} className="ml12 tagscolor task-hide" title={i.name}>{i.name}</span>
)
})
:""
}
</div>
<div className="infos">
<Link to={`/${item.author && item.author.login}`}><img src={`${getImageUrl(item.author && item.author.image_url)}`} alt="" /></Link>
<span className="mr20"><Link style={{color:"#898d9d"}} to={`/${item.author && item.author.login}`}>{item.author && item.author.name}</Link></span>
<span className="mr25">{item.created_at} 发布</span>
<span className="mr50">{item.updated_at}更新</span>
{item.milestone_name && <span style={{maxWidth:"120px"}} title={item.milestone_name} className="task-hide"><i className="iconfont icon-lichengbeiicon1 font-12 mr3"></i>{item.milestone_name}</span> }
<div>
<div className="infos">
<div className="ilog">
{ item.project_issues_index &&
<Copy value={`/${owner}/${projectsId}/issues/${item.project_issues_index}`}><span className="number">#{item.project_issues_index}</span></Copy>
}
</div>
<Link to={`/${item.author && item.author.login}`}><img src={`${getImageUrl(item.author && item.author.image_url)}`} alt="" /></Link>
<span className="mr20"><Link style={{color:"#898d9d"}} to={`/${item.author && item.author.login}`}>{item.author && item.author.name}</Link></span>
<span className="mr25">{item.created_at} 发布</span>
<span className="mr50">{item.updated_at}更新</span>
{item.milestone_name && <span style={{maxWidth:"120px"}} title={item.milestone_name} className="task-hide"><i className="iconfont icon-lichengbeiicon1 font-12 mr3"></i>{item.milestone_name}</span> }
</div>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
import React , { forwardRef , useState } from 'react';
import {LongWidth } from '../../Component/layout';
import { Form , Input , Button } from 'antd';
import MDEditor from "../../../modules/tpm/challengesnew/tpm-md-editor";
import Upload from "../../Upload/Index";

View File

@ -113,7 +113,7 @@ function Details(props){
case "低":
return "status low";
case "正常":
return "status normal";
return "status normals";
case "高":
return "status hight";
default:
@ -309,10 +309,9 @@ function Details(props){
if(copy){
props.history.push(`/${owner}/${projectsId}/issues/${index}`);
}else{
setEdit(false)
setEdit(false);
}
}
let host = window.location.hostname === "localhost" ? "testforgeplus.trustie.net" : window.location.hostname;
return(
details ?
<Box>
@ -337,7 +336,7 @@ function Details(props){
onCancel={onCancel}
title={details.subject}
desc={details.description}
files={details.attachments}
files={copy ? undefined : details.attachments}
createFunc={createFunc}
owner = {owner} projectsId = {projectsId}
/>
@ -346,12 +345,14 @@ function Details(props){
<div className="editpanel">
<div className="detailbanner">
<div className="detailtitle">
<div className="ilog">
<div className="mb12">
{details.priority && <span className={statusTag(details.priority.name)}>{ details.priority.name }</span> }
<Copy value={`/${owner}/${projectsId}/issues/${index}`}><span className="number">#{details.project_issues_index}</span></Copy>
<p className="name">{details.subject}</p>
</div>
<div>
<p className="name">{details.subject}</p>
<div className="ilog">
<Copy value={`/${owner}/${projectsId}/issues/${index}`}><span className="number">#{details.project_issues_index}</span></Copy>
</div>
{
details.author &&
<div>

View File

@ -206,6 +206,7 @@
.issuedetail{
display: flex;
align-items: flex-start;
flex:1;
}
}
.idetails{
@ -289,45 +290,44 @@
}
// 状态样式-公用
.ilog{
width: 45px;
display: flex;
flex-direction: column;
.status{
display: block;
height:22px;
border-radius:6px;
text-align: center;
margin-right: 10px;
.status{
display: block;
height:22px;
border-radius:6px;
text-align: center;
margin-right: 10px;
line-height: 22px;
color: #fff;
width: 100%;
font-size: 15px;
&.normal{
background-color:#28be6c;
}
&.hight{
background-color: #db3d1d;
}
&.urgent{
background-color: #db3d1d;
}
&.low{
background-color: #1abcb1;
}
line-height: 22px;
color: #fff;
width: 45px;
font-size: 15px;
&.normals{
background-color:#28be6c;
}
&.hight{
background-color: #db3d1d;
}
&.urgent{
background-color: #db3d1d;
}
&.low{
background-color: #1abcb1;
}
}
.ilog{
min-width: 45px;
margin-right: 10px;
clear: both;
.number{
background-color:rgba(213, 220, 246, 0.36);
border-radius:4px;
height: 19px;
line-height: 19px;
color: #666666;
width: 30px;
text-align: center;
display: block;
margin-top: 14px;
float: left;
padding:0px 4px;
cursor: pointer;
font-size: 13px;
}
}
// colorCard
@ -611,13 +611,16 @@
align-items: center;
justify-content: space-between;
.detailtitle{
display: flex;
flex: 1;
&>div{
display: flex;
align-items: center;
}
.name{
font-size: 16px;
font-weight: 700;
color:#333;
line-height: 22px;
margin-bottom: 9px!important;
max-width: 580px;
}
.author{