From e085f39c1384c65e1c3c42fae7d7191661f2ddf4 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 23 Oct 2025 17:29:32 +0800 Subject: [PATCH] chore: description and category --- web/app/components/explore/app-card/index.tsx | 4 ++-- web/app/components/explore/app-list/index.tsx | 9 +++++++-- .../explore/try-app/app-info/index.tsx | 18 +++++++++++------- web/app/components/explore/try-app/index.tsx | 4 +++- web/context/explore-context.ts | 1 + web/service/try-app.ts | 1 + 6 files changed, 25 insertions(+), 12 deletions(-) diff --git a/web/app/components/explore/app-card/index.tsx b/web/app/components/explore/app-card/index.tsx index 1f09575db3..0363fce32c 100644 --- a/web/app/components/explore/app-card/index.tsx +++ b/web/app/components/explore/app-card/index.tsx @@ -32,9 +32,9 @@ const AppCard = ({ const setShowTryAppPanel = useContextSelector(ExploreContext, ctx => ctx.setShowTryAppPanel) const showTryAPPPanel = useCallback((appId: string) => { return () => { - setShowTryAppPanel?.(true, { appId }) + setShowTryAppPanel?.(true, { appId, category: app.category }) } - }, [setShowTryAppPanel]) + }, [setShowTryAppPanel, app.category]) return (
diff --git a/web/app/components/explore/app-list/index.tsx b/web/app/components/explore/app-list/index.tsx index 6292bc6aca..02b3ae085d 100644 --- a/web/app/components/explore/app-list/index.tsx +++ b/web/app/components/explore/app-list/index.tsx @@ -148,7 +148,7 @@ const Apps = ({ const hideTryAppPanel = useCallback(() => { setShowTryAppPanel(false) }, [setShowTryAppPanel]) - const appId = useContextSelector(ExploreContext, ctx => ctx.currentApp?.appId) as string + const appParams = useContextSelector(ExploreContext, ctx => ctx.currentApp) if (!categories || categories.length === 0) { return (
@@ -244,7 +244,12 @@ const Apps = ({ ) } - {isShowTryAppPanel && } + {isShowTryAppPanel && ( + + )}
) } diff --git a/web/app/components/explore/try-app/app-info/index.tsx b/web/app/components/explore/try-app/app-info/index.tsx index 9e26e687d4..4d17575466 100644 --- a/web/app/components/explore/try-app/app-info/index.tsx +++ b/web/app/components/explore/try-app/app-info/index.tsx @@ -11,6 +11,7 @@ import { RiAddLine } from '@remixicon/react' type Props = { appDetail: TryAppInfo + category?: string className?: string } @@ -18,6 +19,7 @@ const headerClassName = 'system-sm-semibold-uppercase text-text-secondary mb-3' const AppInfo: FC = ({ className, + category, appDetail, }) => { const { t } = useTranslation() @@ -50,18 +52,20 @@ const AppInfo: FC = ({
-
- A workflow designed to translate a full book up to 15000 tokens per run. Uses Code node to separate text into chunks -
+ {appDetail.description && ( +
{appDetail.description}
+ )} -
-
Category
-
AI Coding
-
+ {category && ( +
+
Category
+
{category}
+
+ )}
Requirements
diff --git a/web/app/components/explore/try-app/index.tsx b/web/app/components/explore/try-app/index.tsx index e5dfd0ca76..15102facdb 100644 --- a/web/app/components/explore/try-app/index.tsx +++ b/web/app/components/explore/try-app/index.tsx @@ -13,11 +13,13 @@ import Loading from '@/app/components/base/loading' type Props = { appId: string + category?: string onClose: () => void } const TryApp: FC = ({ appId, + category, onClose, }) => { const [type, setType] = useState(TypeEnum.TRY) @@ -50,7 +52,7 @@ const TryApp: FC = ({ {/* Main content */}
{type === TypeEnum.TRY ? : } - +
)} diff --git a/web/context/explore-context.ts b/web/context/explore-context.ts index b7e1f9e0cd..20ce516323 100644 --- a/web/context/explore-context.ts +++ b/web/context/explore-context.ts @@ -4,6 +4,7 @@ import { noop } from 'lodash-es' export type CurrentTryAppParams = { appId: string + category?: string } type IExplore = { diff --git a/web/service/try-app.ts b/web/service/try-app.ts index de00e0a6d7..17624c7a1c 100644 --- a/web/service/try-app.ts +++ b/web/service/try-app.ts @@ -13,6 +13,7 @@ import type { Viewport } from 'reactflow' export type TryAppInfo = { name: string + description: string mode: AppMode site: SiteInfo model_config: ModelConfig