From 18746dedb12bc83f01de39eaaab6b14285d0de0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Sat, 11 May 2024 14:10:10 +0800 Subject: [PATCH] =?UTF-8?q?commit=20id=E6=94=AF=E6=8C=81=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=88=B0=E4=BB=A3=E7=A0=81=E5=BA=93=EF=BC=8Cwebhook=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E5=A4=8D=E5=88=B6=E9=94=99=E8=AF=AFbug=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Server/reposyncer/component/recordList.jsx | 4 ++-- src/forge/Server/reposyncer/component/setting.jsx | 11 ++++++----- src/forge/Server/reposyncer/index.scss | 4 ---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/forge/Server/reposyncer/component/recordList.jsx b/src/forge/Server/reposyncer/component/recordList.jsx index 801ca93d..24c03b82 100644 --- a/src/forge/Server/reposyncer/component/recordList.jsx +++ b/src/forge/Server/reposyncer/component/recordList.jsx @@ -45,11 +45,11 @@ function RecordList(props){ // 同步状态errorBox let columns = [ - { title: '序号', dataIndex: 'index', className:"recordColumns", render: (text, item, index) => {(current-1)*pageSize+index + 1} }, + { title: '序号', dataIndex: 'index', className:"recordColumns", align: 'center', render: (text, item, index) => {(current-1)*pageSize+index + 1} }, { title: '代码变更方', dataIndex: 'change_from', className:"recordColumns"}, { title: '同步时间', dataIndex: 'sync_time', className:"recordColumns"}, { title: '同步状态', dataIndex: 'sync_status', className:"recordColumns", render: (text)=>sync_status(text)}, - { title: 'commit id', dataIndex: 'commit_id', className:"primaryColor recordColumns"}, + { title: 'commit id', dataIndex: 'commit_id', className:"recordColumns", render: (text) =>{ return {text}}}, { title: '同步日志', dataIndex: 'action', align: 'center', className:"primaryColor recordColumns"}, ] diff --git a/src/forge/Server/reposyncer/component/setting.jsx b/src/forge/Server/reposyncer/component/setting.jsx index 1ab7c952..ece673cd 100644 --- a/src/forge/Server/reposyncer/component/setting.jsx +++ b/src/forge/Server/reposyncer/component/setting.jsx @@ -12,8 +12,9 @@ function RecordList(props){ const {sync_repositories_unique=[]} = storeDetail || {}; const [token, setToken] = useState({}); - function inviteClick() { - const copyEle = document.querySelector('#webhook'); // 获取要复制的节点 + function inviteClick(idName) { + console.log('idName', idName); + const copyEle = document.querySelector(idName); // 获取要复制的节点 if (!copyEle) { console.error("您的CopyTool未设置正确的inputId"); return; @@ -35,7 +36,7 @@ function RecordList(props){ 同步分支列表 同步配置 - {sync_repositories_unique.map(item => { + {sync_repositories_unique.map((item, index) => { const {type, external_repo_address, sync_repository_ids} = item return
同步仓库平台
@@ -44,11 +45,11 @@ function RecordList(props){
{external_repo_address}
Webhook接受请求地址
复制链接} + addonAfter={{inviteClick(`#webhook${index}`)}}>复制链接} />
同步仓库授权
{ diff --git a/src/forge/Server/reposyncer/index.scss b/src/forge/Server/reposyncer/index.scss index a026467c..576c7d26 100644 --- a/src/forge/Server/reposyncer/index.scss +++ b/src/forge/Server/reposyncer/index.scss @@ -318,13 +318,9 @@ } .storeSetting{ .infoBox{ - width: 70%; padding: 3px 15px; background-color: rgba(70,106,255,0.03); } - .webhookCopyBox{ - width: 70%; - } .branchTable{ width: 30%; }