forked from Gitlink/forgeplus-react
pull
This commit is contained in:
commit
6ce554df87
|
|
@ -159,7 +159,7 @@ function Index(props) {
|
||||||
<Dropdown overlay={menu(item.zip_url,item.tar_url)} trigger={['click']} placement="bottomRight">
|
<Dropdown overlay={menu(item.zip_url,item.tar_url)} trigger={['click']} placement="bottomRight">
|
||||||
<a className="btn-83" style={{width: '76px'}}>下载<i className="iconfont icon-sanjiaoxing-down font-14"></i></a>
|
<a className="btn-83" style={{width: '76px'}}>下载<i className="iconfont icon-sanjiaoxing-down font-14"></i></a>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
{txt === item.default_branch ? <Tooltip title={`该分支为默认分支,不支持删除操作`}><Button style={{width: '76px'}} disabled>删除</Button></Tooltip> : <Button className='f6_bor_but' style={{width: '76px'}} onClick={()=>{setVisible(item)}}>删除</Button>}
|
{isManager && (txt === item.default_branch ? <Tooltip title={`该分支为默认分支,不支持删除操作`}><Button style={{width: '76px'}} disabled>删除</Button></Tooltip> : <Button className='f6_bor_but' style={{width: '76px'}} onClick={()=>{setVisible(item)}}>删除</Button>)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -264,7 +264,12 @@ function Index(props) {
|
||||||
function addBranchBtn(){
|
function addBranchBtn(){
|
||||||
setAddBranch(true);
|
setAddBranch(true);
|
||||||
const url = `/v1/${owner}/${projectsId}/branches.json`;
|
const url = `/v1/${owner}/${projectsId}/branches.json`;
|
||||||
Axios.get(url).then(result=>{
|
Axios.get(url,{
|
||||||
|
params:{
|
||||||
|
page: 1,
|
||||||
|
limit: total
|
||||||
|
}
|
||||||
|
}).then(result=>{
|
||||||
if(result){
|
if(result){
|
||||||
const {branches} = result.data;
|
const {branches} = result.data;
|
||||||
setBranchList(branches);
|
setBranchList(branches);
|
||||||
|
|
@ -279,7 +284,7 @@ function Index(props) {
|
||||||
<Input.Search placeholder='请输入分支名称' style={{width: '354px'}} className='searchBranch' onSearch={(value)=>{setCurrent(1);setName(value)}} allowClear/>
|
<Input.Search placeholder='请输入分支名称' style={{width: '354px'}} className='searchBranch' onSearch={(value)=>{setCurrent(1);setName(value)}} allowClear/>
|
||||||
<div>
|
<div>
|
||||||
{isManager && <Link to={`/${owner}/${projectsId}/settings/branches`} className="btn-83" style={{width: '102px'}}><i className="iconfont icon-xuanzhongjibenshezhiicon font-14 mr5"></i>分支设置</Link>}
|
{isManager && <Link to={`/${owner}/${projectsId}/settings/branches`} className="btn-83" style={{width: '102px'}}><i className="iconfont icon-xuanzhongjibenshezhiicon font-14 mr5"></i>分支设置</Link>}
|
||||||
<Button type='primary' onClick={addBranchBtn}>+ 新建分支</Button>
|
{(isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) && <Button type='primary' onClick={addBranchBtn}>+ 新建分支</Button>}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Table
|
<Table
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue