Skip to content

Commit

Permalink
perf: toolkit guide
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu committed Dec 27, 2024
1 parent 5deca7d commit 0462a02
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/global/core/workflow/type/node.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export type NodeTemplateListItemType = {
currentCost?: number; // 当前积分消耗
hasTokenFee?: boolean; // 是否配置积分
instructions?: string; // 使用说明
courseUrl?: string; // 教程链接
};

export type NodeTemplateListType = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ async function handler(
currentCost: plugin.currentCost,
hasTokenFee: plugin.hasTokenFee,
author: plugin.author,
instructions: plugin.userGuide
instructions: plugin.userGuide,
courseUrl: plugin.courseUrl
}))
.filter((item) => {
if (searchKey) {
Expand Down
9 changes: 7 additions & 2 deletions projects/app/src/pages/toolkit/components/PluginCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,13 @@ const PluginCard = ({

<Flex w={'full'} fontSize={'mini'}>
<Flex flex={1}>
{item.instructions && (
<UseGuideModal title={item.name} iconSrc={item.avatar} text={item.instructions}>
{(item.instructions || item.courseUrl) && (
<UseGuideModal
title={item.name}
iconSrc={item.avatar}
text={item.instructions}
link={item.courseUrl}
>
{({ onClick }) => (
<Flex
color={'primary.700'}
Expand Down

0 comments on commit 0462a02

Please sign in to comment.