feat: improve join request visibility for admins and applicants

- Add prominent pending join request badge on GroupView header
  with pulse animation for admins/owners
- Clicking badge smoothly scrolls to request list with highlight
- Add "My Join Requests" section on Profile page
- Show status (pending/approved/rejected), timestamp, and reject reason
- Add API: getMyJoinRequests() to fetch user's full request history

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
wjl
2026-04-23 16:46:29 +08:00
parent a062889a11
commit a762a5bb4c
4 changed files with 299 additions and 4 deletions
+14
View File
@@ -118,6 +118,20 @@ export async function getMyGroupsJoinRequests(): Promise<JoinRequest[]> {
return result.items as unknown as JoinRequest[]
}
// 获取当前用户的所有入群申请(包括所有状态)
export async function getMyJoinRequests(): Promise<JoinRequest[]> {
const user = pb.authStore.model
if (!user) return []
const result = await pb.collection('join_requests').getList(1, 50, {
filter: `user="${user.id}"`,
sort: '-created',
expand: 'group',
$autoCancel: false
})
return result.items as unknown as JoinRequest[]
}
// 审批加入申请
export async function respondJoinRequest(
requestId: string,