Merge remote-tracking branch 'upstream/feature_reposyncer' into gitlink_ssr_head

This commit is contained in:
黄心宇 2024-05-09 14:10:09 +08:00
commit 3f55fcbf36
2 changed files with 4 additions and 12 deletions

View File

@ -16,9 +16,9 @@ function RecordList(props){
const [loading, setLoading] = useState(false);
const [data, setData] = useState({});
// table
const pageSize = 10;
const [current, setCurrent] = useState(1);
const [total, setTotal] = useState(0);
const [pageSize, setPageSize] = useState(10);
const [expandedRowKeys, setExpandedRowKeys] = useState([]);
useEffect(()=>{
@ -74,13 +74,6 @@ function RecordList(props){
setExpandedRowKeys(Array.from(keys));
}
// pagesize
function onShowSizeChange(current, pageSize){
window.scrollTo(0, 0);
setCurrent(1);
setPageSize(pageSize);
}
//
function changePage(page, pageSize){
window.scrollTo(0, 0);
@ -107,8 +100,7 @@ function RecordList(props){
rowKey={'id'}
expandedRowKeys={expandedRowKeys}
onExpand={onExpand}
pagination={false}
// pagination={{current: current, pageSize: pageSize, total: total, showSizeChanger: true, onShowSizeChange:onShowSizeChange, showQuickJumper: true, onChange: changePage}}
pagination={{current: current, pageSize: pageSize, total: total, hideOnSinglePage: true, onChange: changePage}}
/>
</div>
}

View File

@ -130,7 +130,7 @@ function StoreList(props){
</span> },
{ title: 'GitLink分支', dataIndex: 'gitlink_branch_name', className:"recordColumns"},
{ title: '最后一次同步时间', dataIndex: 'sync_time', className:"primaryColor recordColumns"},
{ title: '同步状态', dataIndex: 'sync_status', className:"recordColumns", render: (text)=>sync_status(text)},
{ title: '最后一次同步状态', dataIndex: 'sync_status', className:"recordColumns", render: (text)=>sync_status(text)},
{ title: '操作', dataIndex: 'enable', align: 'center', className:"primaryColor recordColumns", render: (text, item)=>{
const branch = item[platform === 'GitHub' ? 'github_branch': 'gitee_branch']
return <div>
@ -143,7 +143,7 @@ function StoreList(props){
}else{
setBranchRnable(item);
}
}}>{text ? "停止" : "开始"}</a>
}}>{text ? "中止同步" : "启动同步"}</a>
</div>
}},
]