feat(ui): add verification badge to UserProfileHeader
Some checks failed
Frontend CI / build-and-push-web (push) Has been cancelled
Frontend CI / ota-android (push) Has been cancelled
Frontend CI / build-android-apk (push) Has been cancelled

Add verification status display with identity-based badge icons to the user
profile header component. Also add identity and verification_status fields
to UserDTO and UserDetailDTO types.

- Add VerificationBadge component with icon display based on identity type
- Support for student, teacher, staff, alumni, and external identity types
- Add 'none' status to VerificationStatus type for unverified users
This commit is contained in:
lafay
2026-04-26 19:51:26 +08:00
parent 6cbd2092ac
commit 1989cc8519
2 changed files with 65 additions and 4 deletions

View File

@@ -23,6 +23,8 @@ export interface UserDTO {
created_at: string;
is_following?: boolean;
is_following_me?: boolean;
identity?: UserIdentity;
verification_status?: VerificationStatus;
}
export interface UserDetailDTO {
@@ -43,6 +45,8 @@ export interface UserDetailDTO {
// 额外字段
is_following?: boolean; // 当前用户是否关注了该用户
is_following_me?: boolean; // 该用户是否关注了当前用户
identity?: UserIdentity;
verification_status?: VerificationStatus;
}
// ==================== Post DTOs ====================
@@ -858,7 +862,7 @@ export interface CreateVotePostRequest {
// ==================== Verification DTOs ====================
export type VerificationStatus = 'not_submitted' | 'pending' | 'approved' | 'rejected';
export type VerificationStatus = 'not_submitted' | 'pending' | 'approved' | 'rejected' | 'none';
export type UserIdentity = 'general' | 'student' | 'teacher' | 'staff' | 'alumni' | 'external';
export interface VerificationStatusDTO {