gitlink 新增new提示,回归删除不了其他分支文件、文件路径跳转a标签问题解决

This commit is contained in:
何童崇 2022-09-09 10:38:11 +08:00
parent 29da691c4f
commit 123f89f077
8 changed files with 868 additions and 828 deletions

1638
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="29" height="13" viewBox="0 0 29 13">
<defs>
<clipPath id="clip-path">
<rect id="矩形_563" data-name="矩形 563" width="29" height="13" transform="translate(1133 128)" fill="none"/>
</clipPath>
<linearGradient id="linear-gradient" x1="0.668" y1="-0.34" x2="0.3" y2="1.497" gradientUnits="objectBoundingBox">
<stop offset="0" stop-color="#ff7731"/>
<stop offset="0.55" stop-color="#ff3131"/>
<stop offset="1" stop-color="red"/>
</linearGradient>
</defs>
<g id="蒙版组_150" data-name="蒙版组 150" transform="translate(-1133 -128)" clip-path="url(#clip-path)">
<g id="组_2088" data-name="组 2088" transform="translate(-5037.358 -7125.062)">
<path id="路径_6162" data-name="路径 6162" d="M317.251,243.57h17.557c2.58,0,4.671,2.49,4.671,5.561h0c0,3.071-2.091,5.561-4.671,5.561H312.58v-5.561c0-3.071,2.091-5.561,4.671-5.561Z" transform="translate(5858.89 7010.43)" fill="url(#linear-gradient)"/>
<path id="路径_6163" data-name="路径 6163" d="M319.566,246.6h1.341a.229.229,0,0,1,.252.16l1,2.522c0,.126.161.1.218-.057l.745-2.373a.333.333,0,0,1,.333-.252h.883c.161,0,.218.092.172.252l-1.341,4.242a.333.333,0,0,1-.333.252h-1.147a.241.241,0,0,1-.252-.161l-.929-2.454c0-.126-.172-.092-.229.069l-.711,2.293a.344.344,0,0,1-.333.252h-.94c-.149,0-.218-.092-.172-.252l1.227-3.887a.286.286,0,0,0,0-.195v-.16C319.245,246.7,319.372,246.6,319.566,246.6Z" transform="translate(5857.14 7010.874)" fill="#fff"/>
<path id="路径_6164" data-name="路径 6164" d="M325.193,246.6h4.036c.161,0,.218.092.172.252l-.092.3a.344.344,0,0,1-.332.252h-2.293a.206.206,0,0,0-.218.172l-.229.7c0,.115,0,.172.115.172h2.121c.161,0,.218.092.172.252l-.092.3a.344.344,0,0,1-.332.252H326.1a.218.218,0,0,0-.218.172l-.3.952c0,.115,0,.172.115.172h2.408c.16,0,.229.092.172.252l-.092.3a.332.332,0,0,1-.333.252h-3.978c-.161,0-.229-.092-.172-.252l1.215-3.887a.378.378,0,0,0,0-.195v-.161A.247.247,0,0,1,325.193,246.6Z" transform="translate(5857.958 7010.874)" fill="#fff"/>
<path id="路径_6165" data-name="路径 6165" d="M331.071,249.059l1.146-2.075a.378.378,0,0,1,.355-.218h.837c.149,0,.218.069.206.218l-.183,2.087c0,.172.115.161.206,0l1.273-2.293a.367.367,0,0,1,.344-.218h.848c.172,0,.229.092.126.275l-2.454,4.254a.4.4,0,0,1-.355.218h-1.043c-.149,0-.218-.057-.218-.206l.069-1.754c0-.149-.115-.161-.218,0l-1.02,1.743a.39.39,0,0,1-.344.218h-1.009c-.149,0-.229-.08-.218-.218l.195-3.921a.367.367,0,0,0,0-.195v-.115c-.057-.172.057-.3.264-.3h.986c.161,0,.229.069.218.218l-.206,2.293C330.842,249.231,330.979,249.22,331.071,249.059Z" transform="translate(5858.798 7010.868)" fill="#fff"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -95,7 +95,7 @@ function CoderDepot(props){
useEffect(()=>{
if(treeValue){
setTreeValuePath(treeValue.split('/'));
setTreeValuePath(decodeURIComponent(treeValue).split('/'));
}else{
setTreeValuePath(undefined);
}
@ -515,6 +515,7 @@ function CoderDepot(props){
md={mdFlag}
onEdit={onEdit}
currentBranch={branchName || defaultBranch}
branch={branchName || defaultBranch}
type={projectDetail.type}
></CoderRootFileDetail>
}

View File

@ -139,14 +139,14 @@ class CoderRootFileDetail extends Component {
};
deleteFile = () => {
const { branch, detail } = this.props;
const { projectsId, owner } = this.props.match.params;
const { detail } = this.props;
const { projectsId, owner ,branchName} = this.props.match.params;
const url = `/${owner}/${projectsId}/delete_file.json`;
axios.delete(url, {
params: {
filepath: detail.path,
branch,
branch:branchName,
sha: detail.sha,
},
})

View File

@ -164,7 +164,7 @@
line-height: 30px;
background: #fff;
border: 1px solid #D0D0D0;
margin-right: 10px;
margin-right: 14px;
text-align: center;
&:hover,&:active{
background: #F3F4F6;

View File

@ -97,8 +97,8 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur
item.menu_name === "devops" ?
<li className={pathname==="devops" ? "active" : ""}>
{/* <Link to={{ pathname: `/${owner}/${projectsId}/devops${open_devops ? `/dispose`:""}`, state }}> */}
<Link to={{ pathname: `/${owner}/${projectsId}/devops`, state:{...state,open_devops} }}>
<i className="iconfont icon-gongzuoliuicon font-13 mr5 color-grey-3"></i>引擎(Engine)
<Link className='newTab' to={{ pathname: `/${owner}/${projectsId}/devops`, state:{...state,open_devops} }}>
<i className="iconfont icon-gongzuoliuicon font-13 mr5 color-grey-3"></i>引擎(Engine)<div className='newBtnImg'></div>
{projectDetail && projectDetail.ops_count ? <span>{projectDetail.ops_count}</span> : ""}
</Link>
</li>
@ -136,9 +136,9 @@ function DetailBanner({ history,list , owner , projectsId ,showNotification , ur
{
item.menu_name === "services" &&
<li className={pathname === "server" ? "active" : ""}>
<Link to={{ pathname: `/${owner}/${projectsId}/server`, state }}>
<Link className='newTab' to={{ pathname: `/${owner}/${projectsId}/server`, state }}>
<i className={"iconfont icon-fuwuicon color-grey-3 mr5 font-15"} style={{marginTop:"1px"}}></i>
<span>服务</span>
<span>服务</span><div className='newBtnImg'></div>
</Link>
</li>
}

View File

@ -472,6 +472,7 @@ class MessageCount extends Component {
onClick={this.codeReview}
>
代码评审
<div className='newBtnImg'></div>
</Button>
)}

View File

@ -363,4 +363,22 @@ button.btngrey{
border-color:rgba(153, 153, 153, 0.5);
color: #666666;
}
}
.newContainer {
.newTab,.newBtn {
position: relative;
}
.newBtnImg {
background-image: url('../Images/newIcon.svg');
background-size: 100% 100%;
width: 29px;
height: 13px;
position: absolute;
right: -14px;
top: -7px;
}
.newTab .newBtnImg {
right: -19px;
}
}