Conversation
Co-authored-by: U8F69 <[email protected]>
Co-authored-by: U8F69 <[email protected]>
There was a problem hiding this comment.
Pull Request Overview
本次 PR 为项目详情页新增“举报按钮”功能,允许用户在发现违规或问题项目时提交举报理由。
- 新增举报相关的类型定义和服务接口
- 实现前端
ReportButton组件并集成到ReceiveContent - 添加本地环境变量配置
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| frontend/lib/services/project/types.ts | 新增 ReportProjectRequest、ReportProjectResponse 类型 |
| frontend/lib/services/project/project.service.ts | 新增 reportProject / reportProjectSafe 方法 |
| frontend/components/common/receive/index.ts | 导出 ReportButton 组件 |
| frontend/components/common/receive/ReportButton.tsx | 实现举报按钮的 UI 组件 |
| frontend/components/common/receive/ReceiveContent.tsx | 在详情页内容中集成 ReportButton |
| frontend/.env.local | 新增本地环境变量配置 |
Comments suppressed due to low confidence (2)
frontend/lib/services/project/project.service.ts:206
- 可在 post 方法中指定请求体类型,如 apiClient.post<ReportProjectResponse, ReportProjectRequest>,提升类型安全。
const response = await apiClient.post<ReportProjectResponse>(`${this.basePath}/${projectId}/report`, {
frontend/.env.local:1
- 建议将 .env.local 添加到 .gitignore,并提供 .env.example 以避免提交本地配置文件到仓库。
FRONTEND_BASE_URL=http://localhost:3000
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: U8F69 <[email protected]>
|
@copilot 参考 UsSubDidIt 的评论处理
|
Co-authored-by: U8F69 <[email protected]>
已完成所有三个改进要求:1) 举报按钮移至页面左下角footer位置;2) 优化gitignore使用通配符模式;3) 修复按钮状态管理,支持实时状态更新。(d39b04f) Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
let me see see |
|
@copilot |
Co-authored-by: U8F69 <[email protected]>
已完成所有要求的更改:1) 将举报按钮移动到项目描述下方,使用 Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: U8F69 <[email protected]>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
TethysPlex
left a comment
There was a problem hiding this comment.
LGTM
此处 LGTM 既可以解释为 Looks Good to Merge, 也可解释为 Looks Good to Me, 令人忍俊不禁。
在项目详情页增加了举报按钮,用户可以通过弹窗填写举报理由来举报存在问题的项目,以防止分发站被滥用。
功能特性
🎯 按钮位置
outline样式,保持界面简洁📝 举报流程
🔐 用户状态管理
⚡ 交互体验
技术实现
后端集成
/api/v1/projects/{id}/reportAPI 接口{"reason": string}前端组件
ReportButton组件,使用现有的 Dialog UI 组件ReceiveContent组件中集成,位置在ReceiveButton下方代码质量
界面展示
举报按钮将显示在项目详情页的"立刻领取"按钮下方,用户点击后可以通过弹窗填写举报理由并提交。
Fixes #63.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
fonts.googleapis.com/opt/hostedtoolcache/node/20.19.2/x64/bin/node /home/REDACTED/work/cdk/cdk/frontend/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/jest-worker/processChild.js(dns block)next-server (v15.3.4)(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.