refactor: center align columns in InstalledPluginsList and set AntTable size to small

This commit is contained in:
kangfenmao 2025-11-06 12:26:09 +08:00
parent 84bf94e2ff
commit 2e0ff28505

View File

@ -69,12 +69,14 @@ export const InstalledPluginsList: FC<InstalledPluginsListProps> = ({ plugins, o
title: t('plugins.type'), title: t('plugins.type'),
dataIndex: 'type', dataIndex: 'type',
key: 'type', key: 'type',
align: 'center',
render: (type: string) => <Tag color={type === 'agent' ? 'magenta' : 'purple'}>{type}</Tag> render: (type: string) => <Tag color={type === 'agent' ? 'magenta' : 'purple'}>{type}</Tag>
}, },
{ {
title: t('plugins.category'), title: t('plugins.category'),
dataIndex: 'category', dataIndex: 'category',
key: 'category', key: 'category',
align: 'center',
render: (_: any, plugin: InstalledPlugin) => ( render: (_: any, plugin: InstalledPlugin) => (
<Tag <Tag
icon={<Dot size={14} strokeWidth={8} />} icon={<Dot size={14} strokeWidth={8} />}
@ -91,7 +93,7 @@ export const InstalledPluginsList: FC<InstalledPluginsListProps> = ({ plugins, o
{ {
title: t('plugins.actions'), title: t('plugins.actions'),
key: 'actions', key: 'actions',
align: 'right' as const, align: 'center',
render: (_: any, plugin: InstalledPlugin) => ( render: (_: any, plugin: InstalledPlugin) => (
<Button <Button
danger danger
@ -105,5 +107,5 @@ export const InstalledPluginsList: FC<InstalledPluginsListProps> = ({ plugins, o
} }
] ]
return <AntTable columns={columns} dataSource={plugins} /> return <AntTable columns={columns} dataSource={plugins} size="small" />
} }