📱 feat(ui): Enhance mobile log table UX & fix StrictMode warning
Summary 1. CardTable • Added collapsible “Details / Collapse” section on mobile cards using Semi-UI Button + Collapsible with chevron icons. • Integrated i18n (`useTranslation`) for the toggle labels. • Restored original variable-width skeleton placeholders (50 % / 60 % / 70 % …) for more natural loading states. 2. UsageLogsColumnDefs • Wrapped each `Tag` inside a native `<span>` when used as Tooltip trigger, removing `findDOMNode` deprecation warnings in React StrictMode. Impact • Cleaner, shorter rows on small screens with optional expansion. • Fully translated UI controls. • No more console noise in development & CI caused by StrictMode warnings.
This commit is contained in:
@@ -268,12 +268,14 @@ export const getLogsColumns = ({
|
||||
return isAdminUser && (record.type === 0 || record.type === 2 || record.type === 5) ? (
|
||||
<Space>
|
||||
<Tooltip content={record.channel_name || t('未知渠道')}>
|
||||
<Tag
|
||||
color={colors[parseInt(text) % colors.length]}
|
||||
shape='circle'
|
||||
>
|
||||
{text}
|
||||
</Tag>
|
||||
<span>
|
||||
<Tag
|
||||
color={colors[parseInt(text) % colors.length]}
|
||||
shape='circle'
|
||||
>
|
||||
{text}
|
||||
</Tag>
|
||||
</span>
|
||||
</Tooltip>
|
||||
{isMultiKey && (
|
||||
<Tag color='white' shape='circle'>
|
||||
@@ -466,15 +468,17 @@ export const getLogsColumns = ({
|
||||
render: (text, record, index) => {
|
||||
return (record.type === 2 || record.type === 5) && text ? (
|
||||
<Tooltip content={text}>
|
||||
<Tag
|
||||
color='orange'
|
||||
shape='circle'
|
||||
onClick={(event) => {
|
||||
copyText(event, text);
|
||||
}}
|
||||
>
|
||||
{text}
|
||||
</Tag>
|
||||
<span>
|
||||
<Tag
|
||||
color='orange'
|
||||
shape='circle'
|
||||
onClick={(event) => {
|
||||
copyText(event, text);
|
||||
}}
|
||||
>
|
||||
{text}
|
||||
</Tag>
|
||||
</span>
|
||||
</Tooltip>
|
||||
) : (
|
||||
<></>
|
||||
|
||||
Reference in New Issue
Block a user