🎨 style: adjust table column widths for better layout

This commit adjusts the column widths in multiple table components to optimize the layout and improve visual consistency:

- TokensTable:
  - Reduce ID width from 80px to 50px
  - Reduce name width from 160px to 80px
  - Reduce group width from 200px to 180px
  - Reduce balance width from 200px to 120px
  - Reduce operation width from 400px to 350px

- RedemptionsTable:
  - Add fixed widths for all columns:
    - ID: 50px
    - Name: 120px
    - Status: 100px
    - Quota: 100px
    - Created time: 180px
    - User ID: 100px
    - Operation: 300px

- TaskLogsTable:
  - Add fixed widths for all columns:
    - Submit time: 180px
    - Finish time: 180px
    - Duration: 120px
    - Channel: 100px
    - Platform: 120px
    - Type: 120px
    - Task ID: 200px
    - Status: 120px
    - Progress: 160px
    - Fail reason: 160px

- UsersTable:
  - Add fixed widths for all columns:
    - ID: 50px
    - Username: 100px
    - Group: 100px
    - Stats info: 280px
    - Invite info: 250px
    - Role: 120px
    - Status: 100px
    - Operation: 150px

These adjustments ensure better space utilization and consistent column sizing across all table components.
This commit is contained in:
Apple\Apple
2025-05-25 23:35:59 +08:00
parent 59de8e11ac
commit 46a67e09f1
7 changed files with 71 additions and 9 deletions

View File

@@ -289,6 +289,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.SUBMIT_TIME,
title: t('提交时间'),
dataIndex: 'submit_time',
width: 180,
render: (text, record, index) => {
return <div>{text ? renderTimestamp(text) : '-'}</div>;
},
@@ -297,6 +298,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.FINISH_TIME,
title: t('结束时间'),
dataIndex: 'finish_time',
width: 180,
render: (text, record, index) => {
return <div>{text ? renderTimestamp(text) : '-'}</div>;
},
@@ -305,6 +307,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.DURATION,
title: t('花费时间'),
dataIndex: 'finish_time',
width: 120,
render: (finish, record) => {
return <>{finish ? renderDuration(record.submit_time, finish) : '-'}</>;
},
@@ -313,6 +316,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.CHANNEL,
title: t('渠道'),
dataIndex: 'channel_id',
width: 100,
className: isAdminUser ? 'tableShow' : 'tableHiddle',
render: (text, record, index) => {
return isAdminUser ? (
@@ -337,6 +341,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.PLATFORM,
title: t('平台'),
dataIndex: 'platform',
width: 120,
render: (text, record, index) => {
return <div>{renderPlatform(text)}</div>;
},
@@ -345,6 +350,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.TYPE,
title: t('类型'),
dataIndex: 'action',
width: 120,
render: (text, record, index) => {
return <div>{renderType(text)}</div>;
},
@@ -353,6 +359,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.TASK_ID,
title: t('任务ID'),
dataIndex: 'task_id',
width: 200,
render: (text, record, index) => {
return (
<Typography.Text
@@ -371,6 +378,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.TASK_STATUS,
title: t('任务状态'),
dataIndex: 'status',
width: 120,
render: (text, record, index) => {
return <div>{renderStatus(text)}</div>;
},
@@ -379,6 +387,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.PROGRESS,
title: t('进度'),
dataIndex: 'progress',
width: 160,
render: (text, record, index) => {
return (
<div>
@@ -406,6 +415,7 @@ const LogsTable = () => {
key: COLUMN_KEYS.FAIL_REASON,
title: t('失败原因'),
dataIndex: 'fail_reason',
width: 160,
render: (text, record, index) => {
if (!text) {
return t('无');