From 6f54ad92c0a184d862bacacb02ebb7764f4cc7e2 Mon Sep 17 00:00:00 2001 From: ludan <251918489@qq.com> Date: Mon, 8 Jun 2026 18:57:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B7=A5=E5=85=B7=E7=9B=92=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E9=A2=84=E8=A7=88=E5=9B=BE=E6=9B=BF=E6=8D=A2=E4=B8=8E?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E5=BC=8F=E8=A7=86=E8=A7=89=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 本次提交包含以下改进: ## 1. 工具卡片真实预览图替换 (MorePage.tsx) - 移除原有的CSS绘制Before/After对比图(ToolComparePanel/CompareScene) - 新增ToolPreviewPanel组件,使用OSS真实截图展示每个工具的效果预览 - 建立toolPreviewImages映射表,为8个工具分别配置预览图URL - 预览图支持hover悬浮放大效果(popover),桌面端鼠标悬停时展示大图 - 触摸设备通过@media (hover: none)隐藏popover,避免移动端误触 ## 2. 核心工具区重构 (MorePage.tsx) - 移除FeaturedTool独立接口和featuredTools数组,统一到tools体系 - 新增coreToolIds集合标记核心工具(workbench/inpaint/watermarkRemoval) - 新增coreToolGradients和coreToolSteps独立配置每张核心卡的渐变和步骤 - 移除openFeaturedTool,统一使用openTool处理所有工具点击 - 核心卡片kick er改为显示分类标签(图像创作/视频创作) - 视频生成分类标签更名为"视频创作" ## 3. 工具卡片视觉升级 (more.css) - 新增CSS变量体系:--more-card-surface/surface-strong/border/border-strong - 核心工具卡:三列网格布局、渐变背景叠加、预览图16:9占位区 - 普通工具卡:增大最小高度至392px、radial-gradient光晕、增强边框 - 卡片预览图:aspect-ratio容器、内边框光效、::after渐变叠加层 - Hover悬浮popover:从卡片底部弹出大图,160ms过渡动画 - CTA按钮强化:渐变背景、内阴影高光、font-weight 850 - :active状态按压反馈(translateY(0)消除位移) - 阴影系统升级:更深、更柔和的阴影层次 ## 4. Prompt案例弹窗响应式重构 (workbench.css) - 720px断点:从垂直堆叠改为水平左右分栏布局(1.08:0.92) - 侧边栏从底部面板移至右侧,带左分割线和投影 - 420px断点:紧凑水平分栏(0.9:1.1)、更小字号和间距 - 弹窗增加边框和圆角、关闭按钮毛玻璃效果 - 作者信息采用grid布局、描述文本line-clamp截断 ## 5. 响应式细节完善 - more.css 860px: 双列核心卡、增大预览图、调整间距 - more.css 520px: 单列布局、筛选标签横向滚动、CTA按钮全宽 - workbench.css: 各断点prompt-case-modal精确调优 --- src/features/more/MorePage.tsx | 300 ++++++++++++++---------- src/styles/pages/more.css | 413 +++++++++++++++++++++++++-------- src/styles/pages/workbench.css | 321 ++++++++++++++++++++++--- 3 files changed, 769 insertions(+), 265 deletions(-) diff --git a/src/features/more/MorePage.tsx b/src/features/more/MorePage.tsx index 1c61052..d57f66c 100644 --- a/src/features/more/MorePage.tsx +++ b/src/features/more/MorePage.tsx @@ -37,117 +37,153 @@ interface MoreTool { imageTool?: WebImageWorkbenchTool; ready: boolean; badge?: string; - featured?: boolean; } -type CompareScene = - | "workbench" - | "inpaint" - | "camera" - | "upscale" - | "watermark" - | "dialog" - | "subtitle" - | "digital-human" - | "character" - | "avatar"; - -const toolCompareScenes: Record = { - workbench: "workbench", - inpaint: "inpaint", - camera: "camera", - upscale: "upscale", - watermarkRemoval: "watermark", - dialogGenerator: "dialog", - subtitleRemoval: "subtitle", - digitalHuman: "digital-human", - characterMix: "character", - avatarConsole: "avatar", +const toolPreviewImages: Record = { + inpaint: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E5%B1%80%E9%83%A8%E9%87%8D%E7%BB%98.PNG", + camera: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E9%95%9C%E5%A4%B4%E5%AE%9E%E9%AA%8C%E5%AE%A4.PNG", + upscale: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E5%88%86%E8%BE%A8%E7%8E%87%E6%8F%90%E5%8D%87.PNG", + watermarkRemoval: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E5%8E%BB%E6%B0%B4%E5%8D%B0.PNG", + dialogGenerator: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E4%BA%A4%E4%BA%92%E5%BC%8F%E5%AF%B9%E8%AF%9D%E6%A1%86%E7%94%9F%E6%88%90%E5%99%A8.PNG", + subtitleRemoval: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E5%AD%97%E5%B9%95%E5%8E%BB%E9%99%A4.PNG", + characterMix: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E8%A7%92%E8%89%B2%E8%BF%81%E7%A7%BB.PNG", + avatarConsole: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E6%95%B0%E5%AD%97%E4%BA%BA%E6%8E%A7%E5%88%B6%E5%8F%B0.PNG", }; -function ToolComparePanel({ scene }: { scene: CompareScene }) { +function ToolPreviewPanel({ toolId }: { toolId: string }) { + const imageUrl = toolPreviewImages[toolId]; + if (!imageUrl) return null; + return ( -