Skip to content

Commit

Permalink
feat(frontend): add online minoru
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-Shen committed Aug 12, 2024
1 parent 3d28a97 commit efa6ff3
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions apps/frontend/src/components/AppPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,41 @@ import styles from './index.module.css';
interface AppLink {
name: string;
title: string;
link: string;
links: {
name: string;
link: string;
}[];
icon: JSX.Element;
description: string;
}

const apps = [
{
name: 'OpenDataLab',
title: '立即前往',
link: 'https://opendatalab.com',
links: [{ name: '立即前往', link: 'https://opendatalab.com' }],
icon: <OpenDataLab />,
description: '一个引领 AI 大模型时代的开放数据平台,提供了海量的、多模态的优质数据集,助力 AI 开发落地',
},
{
name: 'LabelLLM',
title: 'Github',
link: 'https://labelllm.com',
links: [{ name: 'Github', link: 'https://labelllm.com' }],
icon: <LabelLLM />,
description: '专业致力于 LLM 对话标注,通过灵活的工具配置与多种数据模态的广泛兼容,为大模型打造高质量数据',
},
{
name: 'MinorU',
title: 'Github',
link: 'https://minoru.com',
links: [
{ name: 'Github', link: 'https://minoru.com' },
{ name: '在线体验', link: 'https://opendatalab.com/OpenSourceTools/Extractor/PDF' },
],
icon: <MinorU />,
description: '一站式开源高质量数据提取工具,支持多格式(PDF/网页/电子书),智能萃取,生成高质量语料',
},
];

export default function AppPanel() {
const handleGoApp = (app: AppLink) => {
window.open(app.link, '_blank');
window.open(app.links[0].link, '_blank');
};

return (
Expand All @@ -51,7 +54,7 @@ export default function AppPanel() {
<div className={styles.panel}>
{_.map(apps, (app) => {
return (
<div key={app.title} className={styles.appWrapper}>
<div key={app.name} className={styles.appWrapper}>
<div className={styles.appContainer}>
<div className={styles.header} onClick={() => handleGoApp(app)}>
<Avatar shape="square" className={styles.avatar} src={app.icon} />
Expand All @@ -61,10 +64,14 @@ export default function AppPanel() {
</div>
</div>
<div className={styles.links}>
<a href={app.link} target="_blank" rel="noreferrer" className={styles.link}>
{app.title}
<ArrowRightOutlined className={styles.arrow} />
</a>
{_.map(app.links, (link) => {
return (
<a href={link.link} key={link.name} target="_blank" rel="noreferrer" className={styles.link}>
{link.name}
<ArrowRightOutlined className={styles.arrow} />
</a>
);
})}
</div>
</div>
</div>
Expand Down

0 comments on commit efa6ff3

Please sign in to comment.