fix: show sync failures on hover and preserve browser error details
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// 监控账号列表:表格呈现账号画像、作品数据与同步状态。
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { history } from '@umijs/max';
|
||||
import { Alert, App, Avatar, Button, Card, Flex, Form, Modal, Popconfirm, Select, Space, Table, Tag, Typography } from 'antd';
|
||||
import { Alert, App, Avatar, Button, Card, Flex, Form, Modal, Popconfirm, Select, Space, Table, Tag, Tooltip, Typography } from 'antd';
|
||||
import type { ColumnsType } from 'antd/es/table';
|
||||
import { CloudUploadOutlined, ReloadOutlined } from '@ant-design/icons';
|
||||
import { getList, remove, creatorAction, creatorUpdate } from '@/services/api';
|
||||
@@ -165,11 +165,14 @@ export default function MonitoringAccountList() {
|
||||
const meta = syncStatusMeta[account.sync_status ?? ''] || { label: account.sync_status || '—' };
|
||||
return (
|
||||
<Flex vertical>
|
||||
<div><Tag color={meta.color}>{meta.label}</Tag></div>
|
||||
<div>
|
||||
<Tooltip title={account.sync_status === 'failed' || account.sync_status === 'blocked' ? account.sync_error : undefined}>
|
||||
<Tag color={meta.color}>{meta.label}</Tag>
|
||||
</Tooltip>
|
||||
</div>
|
||||
<Typography.Text type="secondary" style={{ fontSize: 12 }}>
|
||||
上次同步 {account.last_sync_at ? dateTime(account.last_sync_at) : '—'}
|
||||
</Typography.Text>
|
||||
{account.sync_error ? <Typography.Text type="danger" style={{ fontSize: 12 }}>{account.sync_error}</Typography.Text> : null}
|
||||
</Flex>
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user