同上-修改bug

This commit is contained in:
caishi 2021-07-30 17:02:44 +08:00
parent f7698334ab
commit 2b47c1ff9a
3 changed files with 10 additions and 7 deletions

View File

@ -329,7 +329,7 @@ function New({ form , match , showNotification , history }) {
}
</Form>
</div>
{ id && <PushHistory id={id} owner={owner} projectsId={projectsId}/> }
{ id && <PushHistory id={id} owner={owner} projectsId={projectsId} showNotification={showNotification}/> }
</div>
)
}

View File

@ -5,7 +5,7 @@ import Content from './historyContent';
import Fault from '../images/fault.png';
const { Panel } = Collapse;
function PushHistory({id,owner,projectsId}) {
function PushHistory({id,owner,projectsId,showNotification}) {
const [ list , setList ] = useState(undefined);
const [ isSpin , setIsSpin ] = useState(false);
@ -32,8 +32,8 @@ function PushHistory({id,owner,projectsId}) {
const url = `/${owner}/${projectsId}/webhooks/${id}/test.json`;
axios.post(url).then(result=>{
if(result && result.data){
Init();
}else{
// Init();
showNotification("测试推送已经加入到队列,请耐心等待数秒再刷新推送记录!");
setIsSpin(false);
}
}).catch(error=>{setIsSpin(false);})
@ -43,7 +43,10 @@ function PushHistory({id,owner,projectsId}) {
<div className="pt30">
<div className="deschead">
<span className="font-16">最近推送历史</span>
<Button type="primary" onClick={testFunc} loading={isSpin}>测试推送</Button>
<span>
<a className="color-blue" onClick={Init}>刷新</a>
<Button type="primary" className="ml20" onClick={testFunc} loading={isSpin}>测试推送</Button>
</span>
</div>
{
list && list.length>0 &&

View File

@ -262,8 +262,8 @@ form{
border-color: #D0D0D0;
}
.ant-btn.ant-btn-background-ghost.ant-btn-primary:hover{
background-color: #2A61FF!important;
border-color: #2A61FF;
background-color: #1890ff!important;
border-color: #1890ff;
color: #fff;
}
.ant-btn.ant-btn-background-ghost.ant-btn-danger:hover{