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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user