From f9c63a68956633c4fc8eff530ec24a14b972774e Mon Sep 17 00:00:00 2001 From: que01 Date: Tue, 22 Sep 2026 23:50:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=A5=E5=85=A5=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E7=BB=84=E5=90=88=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/features/workspace/WorkspacePage.tsx | 48 +++++++++++++++++++ docs/template-runtime-progress.md | 1 + 2 files changed, 49 insertions(+) diff --git a/apps/admin/src/features/workspace/WorkspacePage.tsx b/apps/admin/src/features/workspace/WorkspacePage.tsx index 879d56a..1c31bd0 100644 --- a/apps/admin/src/features/workspace/WorkspacePage.tsx +++ b/apps/admin/src/features/workspace/WorkspacePage.tsx @@ -35,6 +35,8 @@ export function WorkspacePage() { description: string; capabilities: string[]; } | null>(null); + const [previewIndustry, setPreviewIndustry] = useState("personal"); + const [previewVisual, setPreviewVisual] = useState("linjing-editorial"); const [form] = Form.useForm>(); const [inquiryForm] = Form.useForm>(); const query = useQuery({ @@ -49,6 +51,11 @@ export function WorkspacePage() { queryKey: ["template-catalog"], queryFn: () => client.listPublicTemplates(), }); + const combinationPreview = useQuery({ + queryKey: ["template-combination-preview", previewIndustry, previewVisual], + queryFn: () => client.previewPublicTemplateCombination(previewIndustry, previewVisual), + enabled: Boolean(templateCatalog.data), + }); const visualTemplate = useMutation({ mutationFn: (key: string) => client.updateAdminBrand({ @@ -356,6 +363,47 @@ export function WorkspacePage() { {industryTarget?.capabilities.join("、") || "无"}。 + + + ({ + value: item.key, + label: item.name, + }))} + /> + + {combinationPreview.isLoading ? ( + + ) : combinationPreview.data ? ( + + + {combinationPreview.data.industry.name} × {combinationPreview.data.visual.name} + + + {combinationPreview.data.runtime.modules.map((item) => ( + + {item.title} · {item.variant} + + ))} + + + 能力: + {combinationPreview.data.runtime.capabilities.map((item) => item.key).join("、") || + "无"} + + + ) : null} +