From 2eae3d18c812a715c28c055aba82d3924250880a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Fri, 17 Feb 2023 15:50:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=88=86=E6=94=AF=20?= =?UTF-8?q?=E6=A0=B9=E6=8D=AEtotal=E8=8E=B7=E5=8F=96=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/tree/Index.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/forge/Main/tree/Index.jsx b/src/forge/Main/tree/Index.jsx index 4268934b..e89f6ae7 100644 --- a/src/forge/Main/tree/Index.jsx +++ b/src/forge/Main/tree/Index.jsx @@ -264,7 +264,12 @@ function Index(props) { function addBranchBtn(){ setAddBranch(true); const url = `/v1/${owner}/${projectsId}/branches.json`; - Axios.get(url).then(result=>{ + Axios.get(url,{ + params:{ + page: 1, + limit: total + } + }).then(result=>{ if(result){ const {branches} = result.data; setBranchList(branches); From 0bf1fc00838a9d6fea9f4d49781533c3b8397037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Mon, 20 Feb 2023 09:59:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=88=86=E6=94=AF?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=88=86=E6=94=AF=E6=B7=BB=E5=8A=A0=E6=9D=83?= =?UTF-8?q?=E9=99=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/tree/Index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forge/Main/tree/Index.jsx b/src/forge/Main/tree/Index.jsx index e89f6ae7..dbfe770f 100644 --- a/src/forge/Main/tree/Index.jsx +++ b/src/forge/Main/tree/Index.jsx @@ -159,7 +159,7 @@ function Index(props) { 下载 - {txt === item.default_branch ? 删除 : {setVisible(item)}}>删除} + {isManager && (txt === item.default_branch ? 删除 : {setVisible(item)}}>删除)} ) } @@ -284,7 +284,7 @@ function Index(props) { {setCurrent(1);setName(value)}} allowClear/> {isManager && 分支设置} - + 新建分支 + {(isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) && + 新建分支}