💄 style(LogsTable): remove prefix icons from tags for cleaner UI
This commit is contained in:
@@ -89,37 +89,37 @@ const LogsTable = () => {
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case 1:
|
case 1:
|
||||||
return (
|
return (
|
||||||
<Tag color='cyan' size='large' shape='circle' prefixIcon={<CreditCard size={14} />}>
|
<Tag color='cyan' size='large' shape='circle'>
|
||||||
{t('充值')}
|
{t('充值')}
|
||||||
</Tag>
|
</Tag>
|
||||||
);
|
);
|
||||||
case 2:
|
case 2:
|
||||||
return (
|
return (
|
||||||
<Tag color='lime' size='large' shape='circle' prefixIcon={<ShoppingCart size={14} />}>
|
<Tag color='lime' size='large' shape='circle'>
|
||||||
{t('消费')}
|
{t('消费')}
|
||||||
</Tag>
|
</Tag>
|
||||||
);
|
);
|
||||||
case 3:
|
case 3:
|
||||||
return (
|
return (
|
||||||
<Tag color='orange' size='large' shape='circle' prefixIcon={<Settings size={14} />}>
|
<Tag color='orange' size='large' shape='circle'>
|
||||||
{t('管理')}
|
{t('管理')}
|
||||||
</Tag>
|
</Tag>
|
||||||
);
|
);
|
||||||
case 4:
|
case 4:
|
||||||
return (
|
return (
|
||||||
<Tag color='purple' size='large' shape='circle' prefixIcon={<Server size={14} />}>
|
<Tag color='purple' size='large' shape='circle'>
|
||||||
{t('系统')}
|
{t('系统')}
|
||||||
</Tag>
|
</Tag>
|
||||||
);
|
);
|
||||||
case 5:
|
case 5:
|
||||||
return (
|
return (
|
||||||
<Tag color='red' size='large' shape='circle' prefixIcon={<AlertTriangle size={14} />}>
|
<Tag color='red' size='large' shape='circle'>
|
||||||
{t('错误')}
|
{t('错误')}
|
||||||
</Tag>
|
</Tag>
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
return (
|
return (
|
||||||
<Tag color='grey' size='large' shape='circle' prefixIcon={<HelpCircle size={14} />}>
|
<Tag color='grey' size='large' shape='circle'>
|
||||||
{t('未知')}
|
{t('未知')}
|
||||||
</Tag>
|
</Tag>
|
||||||
);
|
);
|
||||||
@@ -129,13 +129,13 @@ const LogsTable = () => {
|
|||||||
function renderIsStream(bool) {
|
function renderIsStream(bool) {
|
||||||
if (bool) {
|
if (bool) {
|
||||||
return (
|
return (
|
||||||
<Tag color='blue' size='large' shape='circle' prefixIcon={<Zap size={14} />}>
|
<Tag color='blue' size='large' shape='circle'>
|
||||||
{t('流')}
|
{t('流')}
|
||||||
</Tag>
|
</Tag>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<Tag color='purple' size='large' shape='circle' prefixIcon={<Play size={14} />}>
|
<Tag color='purple' size='large' shape='circle'>
|
||||||
{t('非流')}
|
{t('非流')}
|
||||||
</Tag>
|
</Tag>
|
||||||
);
|
);
|
||||||
@@ -146,21 +146,21 @@ const LogsTable = () => {
|
|||||||
const time = parseInt(type);
|
const time = parseInt(type);
|
||||||
if (time < 101) {
|
if (time < 101) {
|
||||||
return (
|
return (
|
||||||
<Tag color='green' size='large' shape='circle' prefixIcon={<Clock size={14} />}>
|
<Tag color='green' size='large' shape='circle'>
|
||||||
{' '}
|
{' '}
|
||||||
{time} s{' '}
|
{time} s{' '}
|
||||||
</Tag>
|
</Tag>
|
||||||
);
|
);
|
||||||
} else if (time < 300) {
|
} else if (time < 300) {
|
||||||
return (
|
return (
|
||||||
<Tag color='orange' size='large' shape='circle' prefixIcon={<Clock size={14} />}>
|
<Tag color='orange' size='large' shape='circle'>
|
||||||
{' '}
|
{' '}
|
||||||
{time} s{' '}
|
{time} s{' '}
|
||||||
</Tag>
|
</Tag>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<Tag color='red' size='large' shape='circle' prefixIcon={<Clock size={14} />}>
|
<Tag color='red' size='large' shape='circle'>
|
||||||
{' '}
|
{' '}
|
||||||
{time} s{' '}
|
{time} s{' '}
|
||||||
</Tag>
|
</Tag>
|
||||||
@@ -173,21 +173,21 @@ const LogsTable = () => {
|
|||||||
time = time.toFixed(1);
|
time = time.toFixed(1);
|
||||||
if (time < 3) {
|
if (time < 3) {
|
||||||
return (
|
return (
|
||||||
<Tag color='green' size='large' shape='circle' prefixIcon={<Zap size={14} />}>
|
<Tag color='green' size='large' shape='circle'>
|
||||||
{' '}
|
{' '}
|
||||||
{time} s{' '}
|
{time} s{' '}
|
||||||
</Tag>
|
</Tag>
|
||||||
);
|
);
|
||||||
} else if (time < 10) {
|
} else if (time < 10) {
|
||||||
return (
|
return (
|
||||||
<Tag color='orange' size='large' shape='circle' prefixIcon={<Zap size={14} />}>
|
<Tag color='orange' size='large' shape='circle'>
|
||||||
{' '}
|
{' '}
|
||||||
{time} s{' '}
|
{time} s{' '}
|
||||||
</Tag>
|
</Tag>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<Tag color='red' size='large' shape='circle' prefixIcon={<Zap size={14} />}>
|
<Tag color='red' size='large' shape='circle'>
|
||||||
{' '}
|
{' '}
|
||||||
{time} s{' '}
|
{time} s{' '}
|
||||||
</Tag>
|
</Tag>
|
||||||
@@ -245,11 +245,6 @@ const LogsTable = () => {
|
|||||||
onClick: (event) => {
|
onClick: (event) => {
|
||||||
copyText(event, record.model_name).then((r) => { });
|
copyText(event, record.model_name).then((r) => { });
|
||||||
},
|
},
|
||||||
suffixIcon: (
|
|
||||||
<IconForward
|
|
||||||
style={{ width: '0.9em', height: '0.9em', opacity: 0.75 }}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
})}
|
})}
|
||||||
</Popover>
|
</Popover>
|
||||||
</Space>
|
</Space>
|
||||||
@@ -374,7 +369,6 @@ const LogsTable = () => {
|
|||||||
color={colors[parseInt(text) % colors.length]}
|
color={colors[parseInt(text) % colors.length]}
|
||||||
size='large'
|
size='large'
|
||||||
shape='circle'
|
shape='circle'
|
||||||
prefixIcon={<Hash size={14} />}
|
|
||||||
>
|
>
|
||||||
{' '}
|
{' '}
|
||||||
{text}{' '}
|
{text}{' '}
|
||||||
@@ -427,7 +421,6 @@ const LogsTable = () => {
|
|||||||
color='grey'
|
color='grey'
|
||||||
size='large'
|
size='large'
|
||||||
shape='circle'
|
shape='circle'
|
||||||
prefixIcon={<Key size={14} />}
|
|
||||||
onClick={(event) => {
|
onClick={(event) => {
|
||||||
//cancel the row click event
|
//cancel the row click event
|
||||||
copyText(event, text);
|
copyText(event, text);
|
||||||
|
|||||||
Reference in New Issue
Block a user