🔧 chore: Update readme plugin workflow

This commit is contained in:
canisminor1990
2023-12-15 20:27:05 +08:00
committed by arvinxx
parent 292a3e1d62
commit 388eb85515
2 changed files with 11 additions and 13 deletions
+9 -11
View File
@@ -6,18 +6,16 @@ import { fetchPluginIndex, genLink, genTags, readReadme, updateReadme, writeRead
const genPluginTable = (data: DataItem[], lang: string) => {
const isCN = lang === 'zh-CN';
const content = data
.filter((item) => item.author === 'LobeHub')
.map((item) => [
[
genLink(item.meta.title, PLGUIN_URL),
`<sup>By **${item.author}** on **${item.createAt}**</sup>`,
].join('<br/>'),
genLink(item.homepage.split('github.com/')[1], item.homepage),
[item.meta.description, genTags(item.meta.tags)].join('<br/>'),
]);
const content = data.map((item) => [
[
genLink(item.meta.title, PLGUIN_URL),
`<sup>By **${item.author}** on **${item.createAt}**</sup>`,
].join('<br/>'),
genLink(item.homepage.split('github.com/')[1], item.homepage),
[item.meta.description, genTags(item.meta.tags)].join('<br/>'),
]);
return markdownTable([
isCN ? ['官方插件', '仓库', '插件描述'] : ['Official Plugin', 'Repository', 'Description'],
isCN ? ['最近新增', '仓库', '插件描述'] : ['Recent Submits', 'Repository', 'Description'],
...content,
]);
};
@@ -2,7 +2,7 @@ import { ActionIcon, Avatar, Icon } from '@lobehub/ui';
import { Dropdown } from 'antd';
import { createStyles } from 'antd-style';
import isEqual from 'fast-deep-equal';
import { ArrowRight, PencilRuler, Store, ToyBrick } from 'lucide-react';
import { ArrowRight, Blocks, Store, ToyBrick } from 'lucide-react';
import { memo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Flexbox } from 'react-layout-kit';
@@ -106,7 +106,7 @@ const Tools = memo(() => {
placement={'top'}
trigger={['click']}
>
<ActionIcon icon={PencilRuler} placement={'bottom'} title={t('tools.title')} />
<ActionIcon icon={Blocks} placement={'bottom'} title={t('tools.title')} />
</Dropdown>
<PluginStore open={open} setOpen={setOpen} />
</>