feat(profile): avatar presets, upload, nickname editing
- FastAPI: preset assets 01–08, GET list/static, PUT /me/avatar/preset, safer uploaded-avatar path validation, preset_avatars + HTTP tests. - Expo: personal-info (library + presets), profile tab avatar, resolveApiMediaUrl, auth hooks cache sync, Web multipart helper, partial-save messaging + profile i18n. - Includes existing edits to conversation screen and voice use-player. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -104,3 +104,18 @@ class UpdateNicknameRequest(BaseModel):
|
||||
|
||||
class AvatarUploadResponse(BaseModel):
|
||||
avatar_url: str
|
||||
|
||||
|
||||
class SetAvatarPresetRequest(BaseModel):
|
||||
preset_id: str = Field(
|
||||
...,
|
||||
min_length=2,
|
||||
max_length=2,
|
||||
pattern=r"^\d{2}$",
|
||||
description="预设编号,如 01–08",
|
||||
)
|
||||
|
||||
|
||||
class AvatarPresetItem(BaseModel):
|
||||
id: str
|
||||
url: str
|
||||
|
||||
Reference in New Issue
Block a user