Skip to content

feat: 自定义卡片支持目录卡片#1774

Merged
coltea merged 1 commit intochaitin:mainfrom
GavanHub:feature/nav_card
Mar 24, 2026
Merged

feat: 自定义卡片支持目录卡片#1774
coltea merged 1 commit intochaitin:mainfrom
GavanHub:feature/nav_card

Conversation

@GavanHub
Copy link
Copy Markdown
Collaborator

@GavanHub GavanHub commented Mar 20, 2026

自定义卡片支持目录卡片

变更类型

请勾选适用的变更类型:

  • Bug 修复 (不兼容变更的修复)
  • 新功能 (不兼容变更的新功能)
  • 功能改进 (不兼容现有功能的改进)
  • 文档更新
  • 依赖更新
  • 重构 (不影响功能的代码修改)
  • 测试用例
  • CI/CD 配置变更
  • 其他 (请描述):

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

本 PR 为「自定义卡片」新增 目录卡片(nav_doc) 能力,并在 Web App 与 Admin 侧补齐对应的配置、预览与类型支持,以便在落地页按导航分组展示推荐节点。

Changes:

  • 新增 UI 组件 NavDoc,并在 Web App 首页渲染映射中支持 nav_doc 类型
  • Admin 自定义卡片配置新增 nav_doc:支持选择导航目录、拉取分组节点并保存 nav_ids
  • Swagger types / 请求方法同步更新(含 prompt 更新接口、node 分组接口参数扩展等),并更新依赖锁文件

Reviewed changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
web/pnpm-lock.yaml 锁文件更新(含 baseline-browser-mapping/terser 等依赖变更)
web/packages/ui/src/navDoc/index.tsx 新增目录卡片 UI 组件(nav_doc)
web/packages/ui/src/index.tsx 导出 NavDoc 组件
web/packages/ui/src/dirDoc/index.tsx 目录/文件夹卡片标题改为可点击跳转
web/packages/icons/src/index.tsx 导出新增图标 IconMulushu / IconWenjianjia1
web/packages/icons/src/IconWenjianjia1.tsx 新增文件夹图标变体
web/packages/icons/src/IconMulushu.tsx 新增目录图标
web/app/src/views/home/index.tsx Web App 落地页新增 nav_doc 渲染与 props 组装逻辑
web/app/src/request/types.ts App 侧 swagger types 扩展(nav_doc_config、状态枚举等)
web/app/src/request/pro/types.ts Pro 侧 prompt types 调整(新增 update req / 预设开关字段)
web/app/src/request/pro/Prompt.ts prompt 接口从 POST 调整为 PUT(更新方法名/注释/请求方式)
web/admin/src/request/types.ts Admin 侧 swagger types 扩展(nav_doc_config、接口参数等)
web/admin/src/pages/setting/component/AddRecommendContent.tsx 推荐内容选择弹窗改为按 nav 分组展示与全选/折叠
web/admin/src/pages/document/editor/history/index.tsx 跟随 DomainNodeStatus 枚举调整(Released -> Published)
web/admin/src/components/CustomModal/utils.ts 自定义卡片预览 props 组装新增 nav_doc 分支并调整文案
web/admin/src/components/CustomModal/index.tsx nav_doc 预览数据拉取(按 nav_ids 拉分组列表)与提交参数组装
web/admin/src/components/CustomModal/constants.tsx 注册 nav_doc 组件、默认数据、配置映射与图标替换
web/admin/src/components/CustomModal/components/config/NavDocConfig/index.tsx 新增 nav_doc 配置面板(标题/推荐目录列表/选择弹窗)
web/admin/src/components/CustomModal/components/config/NavDocConfig/Item.tsx nav_doc 配置列表项渲染
web/admin/src/components/CustomModal/components/config/NavDocConfig/AddNavContent.tsx 新增“选择目录”弹窗(按 nav 分组展示)
web/admin/src/components/CustomModal/components/config/DirDocConfig/index.tsx 文案调整(推荐目录 -> 推荐文件夹)并移除未使用配置项引用
web/admin/package.json baseline-browser-mapping 版本升级
Files not reviewed (1)
  • web/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/admin/src/components/CustomModal/components/config/NavDocConfig/index.tsx Outdated
Comment thread web/admin/src/components/CustomModal/components/config/NavDocConfig/index.tsx Outdated
Comment thread web/packages/ui/src/navDoc/index.tsx
Comment thread web/admin/src/pages/setting/component/AddRecommendContent.tsx
Comment thread web/admin/src/components/CustomModal/index.tsx
Comment thread web/packages/ui/src/navDoc/index.tsx
Comment thread web/admin/src/pages/setting/component/AddRecommendContent.tsx
Comment thread web/admin/src/pages/setting/component/AddRecommendContent.tsx
@coltea coltea merged commit 38b3288 into chaitin:main Mar 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants