forked from Gitlink/forgeplus-react
issues
This commit is contained in:
parent
ebc02c9667
commit
b72f9f3400
|
|
@ -58,7 +58,12 @@ function Datas({checkbox ,item , projectsId,owner}){
|
|||
<span className="mr12">{item.created_at} 发布</span>
|
||||
<span className="mr20">{item.updated_at}更新</span>
|
||||
{item.blockchain_token_num && <span className="mr30"><img src={gold} alt="" width="13px" className="mr3"/>{item.blockchain_token_num}</span>}
|
||||
{item.milestone_name && <span style={{maxWidth:item.blockchain_token_num ? "261px":"340px"}} title={item.milestone_name} className="task-hide"><i className="iconfont icon-lichengbeiicon1 font-12 mr3"></i>{item.milestone_name}</span> }
|
||||
{item.milestone_id &&
|
||||
<Link to={`/${owner}/${projectsId}/milestones/${item.milestone_id}`} style={{maxWidth:item.blockchain_token_num ? "261px":"340px"}} title={item.milestone_name} className="task-hide">
|
||||
<i className="iconfont icon-lichengbeiicon1 font-12 mr3"></i>
|
||||
{item.milestone_name}
|
||||
</Link>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ function Tags(props) {
|
|||
// 删除标签
|
||||
const [visible, setVisible] = useState(false);
|
||||
const { projectsId, owner } = props.match.params;
|
||||
const { projectDetail} = props;
|
||||
const { projectDetail, current_user} = props;
|
||||
const permission = projectDetail && projectDetail.permission;
|
||||
|
||||
useEffect(()=>{
|
||||
if(projectDetail && document.title.indexOf('所有标签-') === -1){
|
||||
|
|
@ -130,8 +131,24 @@ function Tags(props) {
|
|||
<a href={`${item.zipball_url}`} download className="btn-83" style={{width: '76px'}}>
|
||||
<i className="iconfont icon-xiazai-icon font-16 mr5"></i>ZIP
|
||||
</a>
|
||||
{item.has_release ? <Tooltip title={`该标签已绑定发行版,不支持创建`}><a className="btn-83 disabledBut">创建发行版</a></Tooltip> : <Link to={`/${owner}/${projectsId}/releases/new?tag=${item.name}`} className="btn-83">创建发行版</Link>}
|
||||
{item.has_release ? <Tooltip title={`该标签已绑定发行版,不支持删除操作`}><Button style={{width: '76px'}} disabled className='ml8'>删除</Button></Tooltip> : <Button className='f6_bor_but ml8' style={{width: '76px'}} onClick={()=>{setVisible(item)}}>删除</Button>}
|
||||
{
|
||||
(current_user && current_user.login) && (permission && permission!=="Reporter") &&
|
||||
<React.Fragment>
|
||||
{item.has_release ?
|
||||
<Tooltip title={`该标签已绑定发行版,不支持创建`}>
|
||||
<a className="btn-83 disabledBut">创建发行版</a>
|
||||
</Tooltip>
|
||||
:
|
||||
<Link to={`/${owner}/${projectsId}/releases/new?tag=${item.name}`} className="btn-83">创建发行版</Link>
|
||||
}
|
||||
{item.has_release ?
|
||||
<Tooltip title={`该标签已绑定发行版,不支持删除操作`}>
|
||||
<Button style={{width: '76px'}} disabled className='ml8'>删除</Button>
|
||||
</Tooltip> :
|
||||
<Button className='f6_bor_but ml8' style={{width: '76px'}} onClick={()=>{setVisible(item)}}>删除</Button>
|
||||
}
|
||||
</React.Fragment>
|
||||
}
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ function Index(props) {
|
|||
|
||||
const { projectsId , owner } = props.match.params;
|
||||
const { isManager , isDeveloper , projectDetail , defaultBranch, getDetail } = props;
|
||||
|
||||
useEffect(()=>{
|
||||
// getList();
|
||||
const url = `/v1/${owner}/${projectsId}/branches.json`;
|
||||
|
|
@ -241,6 +240,7 @@ function Index(props) {
|
|||
name: info.name
|
||||
}).then(res=>{
|
||||
if(res && res.data){
|
||||
getDetail();
|
||||
setReload(Math.random());
|
||||
!res.data.status && message.success('操作成功');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ function version(props) {
|
|||
return (
|
||||
<React.Fragment>
|
||||
{
|
||||
data && data.user_admin_permission && type !== 2 &&
|
||||
data && data.user_permission && type !== 2 &&
|
||||
<div className="addReleaseBtn">
|
||||
<Button type={"primary"} onClick={addFunc} className="btnblue" style={{height:"36px"}}>发布新版本</Button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue