[PR #37] feat: 接口组功能优化与推送测试功能优化 #39

Open
opened 2026-03-01 14:53:49 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/beilunyang/moepush/pull/37
Author: @Starpuccino
Created: 11/3/2025
Status: 🔄 Open

Base: mainHead: group-edit-public


📝 Commits (6)

  • 98301e7 feat: 添加接口组对话框和更新接口组功能
  • d0123a4 feat: 添加复制接口和接口组功能
  • 370e173 feat: 更新生成示例体的功能,添加测试推送对话框
  • 64c9dad feat: 添加工具提示组件并在端点组表中显示接口状态
  • cb755a4 fix: 添加错误日志以改进 JSON 格式化和测试推送的错误处理
  • 07464ad fix

📊 Changes

15 files changed (+1389 additions, -67 deletions)

View changed files

app/api/endpoint-groups/[id]/copy/route.ts (+81 -0)
📝 app/api/endpoint-groups/[id]/route.ts (+68 -0)
app/api/endpoints/[endpointId]/copy/route.ts (+61 -0)
components/endpoint-group-dialog.tsx (+219 -0)
📝 components/endpoint-group-example.tsx (+1 -1)
📝 components/endpoint-group-table.tsx (+184 -18)
📝 components/endpoint-table.tsx (+132 -13)
📝 components/endpoints-tabs.tsx (+1 -0)
components/test-push-dialog.tsx (+141 -0)
components/ui/tooltip.tsx (+33 -0)
📝 lib/services/endpoint-groups.ts (+46 -3)
📝 lib/services/endpoints.ts (+17 -2)
📝 lib/utils.ts (+0 -30)
📝 package.json (+1 -0)
📝 pnpm-lock.yaml (+404 -0)

📄 Description

接口组功能优化与推送测试功能优化

概述

  • 增加接口组(创建、编辑)的 UI 与后端 API 支持
    ScreenShot_2025-11-03_012741_298

  • 接口组内,友好显示被禁用的接口数量
    ScreenShot_2025-11-03_014854_630

  • 增加单个接口、接口组的复制能力
    ScreenShot_2025-11-03_012713_740

  • 增加测试推送二次确认,允许自定义测试内容
    ScreenShot_2025-11-03_012604_534
    ScreenShot_2025-11-03_012623_092

关键改动

新增 API 路由

  • A app/api/endpoint-groups/[id]/copy/route.ts — 复制接口组
  • A app/api/endpoints/[endpointId]/copy/route.ts — 复制单个端点

修改 API 路由

  • M app/api/endpoint-groups/[id]/route.ts — (修改)可能添加了权限或返回结构调整(请参见文件)

新增组件

  • A components/endpoint-group-dialog.tsx — 接口组创建/编辑对话框,支持选择多个接口并进行验证
  • A components/test-push-dialog.tsx — 测试推送对话框(支持 JSON 格式化与文本模式)
  • A components/ui/tooltip.tsx — 基于 Radix 的 Tooltip 包装组件

修改/增强的前端组件

  • M components/endpoint-group-example.tsx
  • M components/endpoint-group-table.tsx
  • M components/endpoint-table.tsx
  • M components/endpoints-tabs.tsx
    (这些文件和组件中整合或暴露了接口组相关功能、复制/测试按钮等 UI 交互)

服务层

  • M lib/services/endpoint-groups.ts — 新增 copyEndpointGroup、testEndpointGroup 等方法并改进数据解析
  • M lib/services/endpoints.ts — 新增 copyEndpoint、testEndpoint 并改进错误信息处理

依赖与锁文件

  • M package.json — 依赖版本或新增依赖(如 Radix tooltip 相关已经存在,但有改动)
  • M pnpm-lock.yaml — 锁文件更新

变更影响与注意点

  • 数据库:无变更
  • 测试:本地dev和build通过,数据库操作验证通过

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/beilunyang/moepush/pull/37 **Author:** [@Starpuccino](https://github.com/Starpuccino) **Created:** 11/3/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `group-edit-public` --- ### 📝 Commits (6) - [`98301e7`](https://github.com/beilunyang/moepush/commit/98301e74f8b4cc3d912c0b60eb5dc8896885e6e5) feat: 添加接口组对话框和更新接口组功能 - [`d0123a4`](https://github.com/beilunyang/moepush/commit/d0123a429e0d7735fe6530875d1f583011418ede) feat: 添加复制接口和接口组功能 - [`370e173`](https://github.com/beilunyang/moepush/commit/370e173473d93e4cfe3549121cc1f870f0a3ec8e) feat: 更新生成示例体的功能,添加测试推送对话框 - [`64c9dad`](https://github.com/beilunyang/moepush/commit/64c9dadd93e74a72d028d20e39deb66351b9e7d7) feat: 添加工具提示组件并在端点组表中显示接口状态 - [`cb755a4`](https://github.com/beilunyang/moepush/commit/cb755a4006c778c1eb29b1078c823ca29bf15168) fix: 添加错误日志以改进 JSON 格式化和测试推送的错误处理 - [`07464ad`](https://github.com/beilunyang/moepush/commit/07464ad8b7ccc31b2996dd91471a2124316fa36d) fix ### 📊 Changes **15 files changed** (+1389 additions, -67 deletions) <details> <summary>View changed files</summary> ➕ `app/api/endpoint-groups/[id]/copy/route.ts` (+81 -0) 📝 `app/api/endpoint-groups/[id]/route.ts` (+68 -0) ➕ `app/api/endpoints/[endpointId]/copy/route.ts` (+61 -0) ➕ `components/endpoint-group-dialog.tsx` (+219 -0) 📝 `components/endpoint-group-example.tsx` (+1 -1) 📝 `components/endpoint-group-table.tsx` (+184 -18) 📝 `components/endpoint-table.tsx` (+132 -13) 📝 `components/endpoints-tabs.tsx` (+1 -0) ➕ `components/test-push-dialog.tsx` (+141 -0) ➕ `components/ui/tooltip.tsx` (+33 -0) 📝 `lib/services/endpoint-groups.ts` (+46 -3) 📝 `lib/services/endpoints.ts` (+17 -2) 📝 `lib/utils.ts` (+0 -30) 📝 `package.json` (+1 -0) 📝 `pnpm-lock.yaml` (+404 -0) </details> ### 📄 Description # 接口组功能优化与推送测试功能优化 ## 概述 - 增加接口组(创建、编辑)的 UI 与后端 API 支持 <img width="2033" height="1149" alt="ScreenShot_2025-11-03_012741_298" src="https://github.com/user-attachments/assets/ce50bbb3-8636-44c9-aedf-3bc6dce61614" /> - 接口组内,友好显示被禁用的接口数量 <img width="2078" height="744" alt="ScreenShot_2025-11-03_014854_630" src="https://github.com/user-attachments/assets/c58d8cb2-56fc-40e0-bf48-86a059abb450" /> - 增加单个接口、接口组的复制能力 <img width="1995" height="923" alt="ScreenShot_2025-11-03_012713_740" src="https://github.com/user-attachments/assets/416b274a-26ab-40c7-9a97-30f449b54838" /> - 增加测试推送二次确认,允许自定义测试内容 <img width="500" alt="ScreenShot_2025-11-03_012604_534" src="https://github.com/user-attachments/assets/9475cf83-5b51-476b-ada0-b3b8f37b1130" /> <img width="1112" height="798" alt="ScreenShot_2025-11-03_012623_092" src="https://github.com/user-attachments/assets/bb266efa-0c56-43ec-b09d-a74a30cb7fe6" /> ## 关键改动 ### 新增 API 路由 - A app/api/endpoint-groups/[id]/copy/route.ts — 复制接口组 - A app/api/endpoints/[endpointId]/copy/route.ts — 复制单个端点 ### 修改 API 路由 - M app/api/endpoint-groups/[id]/route.ts — (修改)可能添加了权限或返回结构调整(请参见文件) ### 新增组件 - A components/endpoint-group-dialog.tsx — 接口组创建/编辑对话框,支持选择多个接口并进行验证 - A components/test-push-dialog.tsx — 测试推送对话框(支持 JSON 格式化与文本模式) - A components/ui/tooltip.tsx — 基于 Radix 的 Tooltip 包装组件 ### 修改/增强的前端组件 - M components/endpoint-group-example.tsx - M components/endpoint-group-table.tsx - M components/endpoint-table.tsx - M components/endpoints-tabs.tsx (这些文件和组件中整合或暴露了接口组相关功能、复制/测试按钮等 UI 交互) ### 服务层 - M lib/services/endpoint-groups.ts — 新增 copyEndpointGroup、testEndpointGroup 等方法并改进数据解析 - M lib/services/endpoints.ts — 新增 copyEndpoint、testEndpoint 并改进错误信息处理 ### 依赖与锁文件 - M package.json — 依赖版本或新增依赖(如 Radix tooltip 相关已经存在,但有改动) - M pnpm-lock.yaml — 锁文件更新 ## 变更影响与注意点 - 数据库:无变更 - 测试:本地dev和build通过,数据库操作验证通过 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/moepush#39
No description provided.