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:
Kevin
2026-05-06 13:51:43 +08:00
parent 59d4b19d7d
commit 7ad52fce89
27 changed files with 1271 additions and 270 deletions

View File

@@ -1,212 +1,241 @@
// This file is automatically generated by i18next-cli. Do not edit manually.
interface Resources {
app: {
languages: {
en: 'English';
system: 'System';
zh: 'Chinese';
};
name: 'Life Echo';
tabs: {
conversations: 'Chats';
explore: 'Explore';
home: 'Home';
memoir: 'Memoir';
profile: 'Profile';
};
theme: {
default: 'Default';
};
};
auth: {
login: {
codeLabel: 'Verification Code';
getCode: 'Get Code';
getCodeCountdown: 'Retry in {{seconds}}s';
networkError: 'Network error. Please try again later.';
phoneLabel: 'Phone Number';
phonePlaceholder: 'Enter your phone number';
privacyPolicy: 'Privacy Policy';
submit: 'Login';
termsAnd: 'and';
termsIntro: 'I agree to the';
termsRequired: 'Please agree to the User Agreement and Privacy Policy first';
termsRequiredConfirm: 'OK';
termsRequiredTitle: 'Agreement Required';
userAgreement: 'User Agreement';
welcomeSubtitle: 'Some lives grow richer the more you savor them.';
welcomeTitle: 'Welcome back';
};
};
common: {
chapterLabel: '';
chapterReading: {
backgroundColor: '';
bgPureWhite: '';
bgSepia: '';
close: '';
fontSize: '';
readingSettings: '';
typography: '';
};
continueWriting: '';
docs: 'Docs';
emptySubtitle: '';
emptyTitle: '';
readMemory: '';
startChapter: '';
statusDrafting: '';
statusLocked: '';
statusPending: '';
wordsCount: '';
};
conversation: {
addMore: 'More';
agentName: 'Life Echo';
assistantReplying: 'Replying…';
cancel: 'Cancel';
cancelRecording: 'Cancel recording';
cannotReadAloud: 'Read unavailable';
chatQueueSendTimeout: 'Connection timed out. Check your network and try again.';
chatTitle: 'Conversation';
chatUnavailableConnecting: 'Reconnecting now. You can keep typing and send once the connection is back.';
chatUnavailableDisconnected: 'Connection lost. You can keep typing and send after reconnecting.';
chatUnavailableTitle: 'Chat unavailable';
confirm: 'OK';
confirmDeleteConversation: 'Are you sure you want to delete this conversation? It cannot be recovered.';
connectionConnected: 'Connected';
connectionConnecting: 'Connecting...';
connectionDisconnected: 'Disconnected';
createError: 'Unable to create conversation. Please check your network and try again.';
delete: 'Delete';
deleteConversation: 'Delete Conversation';
emptyGreetingSubtitle: 'Chat with your companion and record your stories.';
greetingTitle: 'Say Hello';
inputPlaceholder: 'Type a message...';
inputPlaceholderVoice: 'Type here or hold the mic to speak...';
me: 'Me';
readAloudAgain: 'Play again';
readingAloud: 'Reading aloud…';
recentChats: 'Recent Chats';
recordingPermissionDenied: 'Microphone permission is required to record';
recordingStartFailed: 'Unable to start recording. Please try again.';
resumeChatSubtitle: 'Open your latest conversation to keep talking.';
resumeChatTitle: 'Continue chatting';
send: 'Send';
startNewSubtitle: 'Capture a new memory or share your thoughts with your companion.';
stopReadingAloud: 'Stop reading aloud';
switchToText: 'Switch to text input';
switchToVoice: 'Switch to voice input';
tapToEndRecording: 'Tap to end';
tapToStartRecording: 'Tap to start recording';
timeDaysAgo_one: '{{count}} day ago';
timeDaysAgo_other: '{{count}} days ago';
timeHoursAgo_one: '{{count}} hour ago';
timeHoursAgo_other: '{{count}} hours ago';
timeJustNow: 'Just now';
timeMinutesAgo_one: '{{count}} minute ago';
timeMinutesAgo_other: '{{count}} minutes ago';
viewAll: 'View All';
voiceMessagePreview: 'Voice message';
};
explore: {};
home: {};
legal: {
titlePrivacy: 'Privacy Policy';
titleTerms: 'User Agreement';
};
memoir: {
chapterLabel: 'Chapter {{index}}';
chapterReading: {
back: 'Back';
backgroundColor: 'Background';
bgPureWhite: 'White';
bgSepia: 'Sepia';
cancel: 'Cancel';
chapterNotFound: 'Chapter not found';
close: 'Close';
confirmDeleteMessage: 'Are you sure you want to delete this chapter? You will no longer be able to view it, but the content will be kept for future reference.';
deleteChapter: 'Delete Chapter';
deleteChapterAction: 'Delete';
fontSans: 'Sans';
fontSerif: 'Serif';
fontSize: 'Font Size';
fontSizeDefault: 'Medium';
fontSizeLarge: 'Large';
fontSizeSmall: 'Small';
readingSettings: 'Reading Settings';
settings: 'Settings';
typography: 'Typography';
};
continueWriting: 'Continue Writing';
emptySubtitle: 'Chat with your companion to record your stories';
emptyTitle: 'No memoir yet';
frameworkChapters: {
chapter1: 'Childhood and upbringing';
chapter2: 'Education and young adulthood';
chapter3: 'Early career';
chapter4: 'Major achievements and peak moments';
chapter5: 'Setbacks, challenges, and turning points';
chapter6: 'Family and relationships';
chapter7: 'Beliefs and values';
chapter8: 'Life summary';
};
loadErrorMessage: 'Could not load chapters';
loadErrorRetry: 'Retry';
pageTitle: 'Memoir';
readMemory: 'Read Memory';
startChapter: 'Start Writing';
statusDrafting: 'Drafting';
statusLocked: 'Locked';
statusPending: 'Pending';
wordsCount: '{{count}} words';
};
profile: {
about: {
aboutUs: 'About Us';
title: 'About';
};
appExperience: {
language: 'Language';
languageDesc: 'Display language';
largeText: 'Large Text';
largeTextDesc: 'Make reading easier';
nightMode: 'Night Mode';
nightModeDesc: 'Use dark theme';
theme: 'Theme';
themeDesc: 'Color theme';
title: 'App Experience';
};
dataPrivacy: {
deleteAll: 'Delete All Data';
deleteUnderDevelopment: 'Delete data feature is under development.';
exportAll: 'Export All Data';
exportUnderDevelopment: 'Export feature is under development.';
purgeDialogCancel: 'Cancel';
purgeDialogConfirm: 'Delete permanently';
purgeDialogDescription: 'This cannot be undone. Your data will be removed immediately.';
purgeDialogTitle: 'Final confirmation';
purgeInputLabel: 'Confirmation phrase';
purgeInputPlaceholder: 'Type the phrase shown above';
purgeOpenConfirm: 'I understand, continue';
purgePhraseHint: 'Type the following Chinese sentence exactly (every character and punctuation). The server only accepts this exact phrase:';
purgeSubmitting: 'Deleting…';
purgeWarningBody: 'This permanently deletes your conversations, memory, stories, chapters, orders, and related files in cloud storage. Profile fields such as birth year, birthplace, where you grew up, and occupation will also be cleared. All devices will be signed out.\nYou can still log in with the same phone number, but your previous content cannot be restored.';
purgeWarningTitle: 'Before you continue';
title: 'Data & Privacy';
};
editAvatar: 'Edit Profile Picture';
helpSupport: {
faq: 'FAQ';
feedback: 'Feedback & Support';
feedbackPageTitle: 'Share your thoughts';
title: 'Help & Support';
};
signOut: 'Sign Out';
signingOut: 'Signing out...';
userNamePlaceholder: 'User';
userTier: '{{tier}}';
};
"app": {
"languages": {
"en": "English",
"system": "System",
"zh": "Chinese"
},
"name": "Life Echo",
"tabs": {
"conversations": "Chats",
"explore": "Explore",
"home": "Home",
"memoir": "Memoir",
"profile": "Profile"
},
"theme": {
"default": "Default"
}
},
"auth": {
"login": {
"codeLabel": "Verification Code",
"getCode": "Get Code",
"getCodeCountdown": "Retry in {{seconds}}s",
"networkError": "Network error. Please try again later.",
"phoneLabel": "Phone Number",
"phonePlaceholder": "Enter your phone number",
"privacyPolicy": "Privacy Policy",
"submit": "Login",
"termsAnd": "and",
"termsIntro": "I agree to the",
"termsRequired": "Please agree to the User Agreement and Privacy Policy first",
"termsRequiredConfirm": "OK",
"termsRequiredTitle": "Agreement Required",
"userAgreement": "User Agreement",
"welcomeSubtitle": "Some lives grow richer the more you savor them.",
"welcomeTitle": "Welcome back"
}
},
"common": {
"chapterLabel": "",
"chapterReading": {
"backgroundColor": "",
"bgPureWhite": "",
"bgSepia": "",
"close": "",
"fontSize": "",
"readingSettings": "",
"typography": ""
},
"continueWriting": "",
"docs": "Docs",
"emptySubtitle": "",
"emptyTitle": "",
"readMemory": "",
"startChapter": "",
"statusDrafting": "",
"statusLocked": "",
"statusPending": "",
"wordsCount": ""
},
"conversation": {
"addMore": "More",
"agentName": "Life Echo",
"assistantReplying": "Replying…",
"cancel": "Cancel",
"cancelRecording": "Cancel recording",
"cannotReadAloud": "Read unavailable",
"chatQueueSendTimeout": "Connection timed out. Check your network and try again.",
"chatTitle": "Conversation",
"chatUnavailableConnecting": "Reconnecting now. You can keep typing and send once the connection is back.",
"chatUnavailableDisconnected": "Connection lost. You can keep typing and send after reconnecting.",
"chatUnavailableTitle": "Chat unavailable",
"confirm": "OK",
"confirmDeleteConversation": "Are you sure you want to delete this conversation? It cannot be recovered.",
"connectionConnected": "Connected",
"connectionConnecting": "Connecting...",
"connectionDisconnected": "Disconnected",
"createError": "Unable to create conversation. Please check your network and try again.",
"delete": "Delete",
"deleteConversation": "Delete Conversation",
"emptyGreetingSubtitle": "Chat with your companion and record your stories.",
"greetingTitle": "Say Hello",
"inputPlaceholder": "Type a message...",
"inputPlaceholderVoice": "Type here or hold the mic to speak...",
"me": "Me",
"readAloudAgain": "Play again",
"readAloudPause": "Pause reading",
"readAloudResume": "Resume reading",
"readingAloud": "Reading aloud…",
"recentChats": "Recent Chats",
"recordingPermissionDenied": "Microphone permission is required to record",
"recordingStartFailed": "Unable to start recording. Please try again.",
"resumeChatSubtitle": "Open your latest conversation to keep talking.",
"resumeChatTitle": "Continue chatting",
"send": "Send",
"startNewSubtitle": "Capture a new memory or share your thoughts with your companion.",
"stopReadingAloud": "Stop reading aloud",
"switchToText": "Switch to text input",
"switchToVoice": "Switch to voice input",
"tapToEndRecording": "Tap to end",
"tapToStartRecording": "Tap to start recording",
"timeDaysAgo_one": "{{count}} day ago",
"timeDaysAgo_other": "{{count}} days ago",
"timeHoursAgo_one": "{{count}} hour ago",
"timeHoursAgo_other": "{{count}} hours ago",
"timeJustNow": "Just now",
"timeMinutesAgo_one": "{{count}} minute ago",
"timeMinutesAgo_other": "{{count}} minutes ago",
"viewAll": "View All",
"voiceMessagePreview": "Voice message"
},
"explore": {
},
"home": {
},
"legal": {
"titlePrivacy": "Privacy Policy",
"titleTerms": "User Agreement"
},
"memoir": {
"chapterLabel": "Chapter {{index}}",
"chapterReading": {
"back": "Back",
"backgroundColor": "Background",
"bgPureWhite": "White",
"bgSepia": "Sepia",
"cancel": "Cancel",
"chapterNotFound": "Chapter not found",
"close": "Close",
"confirmDeleteMessage": "Are you sure you want to delete this chapter? You will no longer be able to view it, but the content will be kept for future reference.",
"deleteChapter": "Delete Chapter",
"deleteChapterAction": "Delete",
"fontSans": "Sans",
"fontSerif": "Serif",
"fontSize": "Font Size",
"fontSizeDefault": "Medium",
"fontSizeLarge": "Large",
"fontSizeSmall": "Small",
"readingSettings": "Reading Settings",
"settings": "Settings",
"typography": "Typography"
},
"continueWriting": "Continue Writing",
"emptySubtitle": "Chat with your companion to record your stories",
"emptyTitle": "No memoir yet",
"frameworkChapters": {
"chapter1": "Childhood and upbringing",
"chapter2": "Education and young adulthood",
"chapter3": "Early career",
"chapter4": "Major achievements and peak moments",
"chapter5": "Setbacks, challenges, and turning points",
"chapter6": "Family and relationships",
"chapter7": "Beliefs and values",
"chapter8": "Life summary"
},
"loadErrorMessage": "Could not load chapters",
"loadErrorRetry": "Retry",
"pageTitle": "Memoir",
"readMemory": "Read Memory",
"startChapter": "Start Writing",
"statusDrafting": "Drafting",
"statusLocked": "Locked",
"statusPending": "Pending",
"wordsCount": "{{count}} words"
},
"profile": {
"about": {
"aboutUs": "About Us",
"title": "About"
},
"appExperience": {
"language": "Language",
"languageDesc": "Display language",
"largeText": "Large Text",
"largeTextDesc": "Make reading easier",
"nightMode": "Night Mode",
"nightModeDesc": "Use dark theme",
"theme": "Theme",
"themeDesc": "Color theme",
"title": "App Experience"
},
"dataPrivacy": {
"deleteAll": "Delete All Data",
"deleteUnderDevelopment": "Delete data feature is under development.",
"exportAll": "Export All Data",
"exportUnderDevelopment": "Export feature is under development.",
"purgeDialogCancel": "Cancel",
"purgeDialogConfirm": "Delete permanently",
"purgeDialogDescription": "This cannot be undone. Your data will be removed immediately.",
"purgeDialogTitle": "Final confirmation",
"purgeInputLabel": "Confirmation phrase",
"purgeInputPlaceholder": "Type the phrase shown above",
"purgeOpenConfirm": "I understand, continue",
"purgePhraseHint": "Type the following Chinese sentence exactly (every character and punctuation). The server only accepts this exact phrase:",
"purgeSubmitting": "Deleting…",
"purgeWarningBody": "This permanently deletes your conversations, memory, stories, chapters, orders, and related files in cloud storage. Profile fields such as birth year, birthplace, where you grew up, and occupation will also be cleared. All devices will be signed out.\nYou can still log in with the same phone number, but your previous content cannot be restored.",
"purgeWarningTitle": "Before you continue",
"title": "Data & Privacy"
},
"editAvatar": "Edit Profile Picture",
"helpSupport": {
"faq": "FAQ",
"feedback": "Feedback & Support",
"feedbackPageTitle": "Share your thoughts",
"title": "Help & Support"
},
"personalInfo": {
"avatarPresetFailed": "Could not set preset avatar",
"avatarUploadFailed": "Could not upload avatar",
"birthPlacePlaceholder": "Birthplace",
"birthYearPlaceholder": "Birth year",
"cancel": "Cancel",
"changeAvatar": "Change photo",
"chooseFromLibrary": "Choose from library",
"choosePreset": "Preset avatars",
"grewUpPlaceholder": "Where you grew up",
"libraryPermissionDenied": "Photo library access is required to pick an image",
"nickname": "Nickname",
"nicknamePlaceholder": "Enter nickname",
"nicknameRequired": "Please enter a nickname",
"occupationPlaceholder": "Occupation",
"presetPickTitle": "Choose a preset",
"save": "Save",
"saveFailed": "Could not save",
"savePartialBody": "Your nickname was saved, but profile fields below could not be saved. Check your connection and tap Save again.",
"savePartialTitle": "Partially saved",
"saving": "Saving…",
"title": "Personal info"
},
"signOut": "Sign Out",
"signingOut": "Signing out...",
"userNamePlaceholder": "User",
"userTier": "{{tier}}"
}
}
export default Resources;

View File

@@ -27,6 +27,8 @@
"recentChats": "Recent Chats",
"stopReadingAloud": "Stop reading aloud",
"readAloudAgain": "Play again",
"readAloudPause": "Pause reading",
"readAloudResume": "Resume reading",
"cannotReadAloud": "Read unavailable",
"readingAloud": "Reading aloud…",
"recordingPermissionDenied": "Microphone permission is required to record",

View File

@@ -33,6 +33,29 @@
"title": "Data & Privacy"
},
"editAvatar": "Edit Profile Picture",
"personalInfo": {
"avatarPresetFailed": "Could not set preset avatar",
"avatarUploadFailed": "Could not upload avatar",
"cancel": "Cancel",
"birthPlacePlaceholder": "Birthplace",
"birthYearPlaceholder": "Birth year",
"changeAvatar": "Change photo",
"chooseFromLibrary": "Choose from library",
"choosePreset": "Preset avatars",
"grewUpPlaceholder": "Where you grew up",
"libraryPermissionDenied": "Photo library access is required to pick an image",
"nickname": "Nickname",
"nicknamePlaceholder": "Enter nickname",
"nicknameRequired": "Please enter a nickname",
"occupationPlaceholder": "Occupation",
"presetPickTitle": "Choose a preset",
"save": "Save",
"saveFailed": "Could not save",
"savePartialBody": "Your nickname was saved, but profile fields below could not be saved. Check your connection and tap Save again.",
"savePartialTitle": "Partially saved",
"saving": "Saving…",
"title": "Personal info"
},
"helpSupport": {
"faq": "FAQ",
"feedback": "Feedback & Support",

View File

@@ -27,6 +27,8 @@
"recentChats": "最近对话",
"stopReadingAloud": "停止朗读",
"readAloudAgain": "再读",
"readAloudPause": "暂停朗读",
"readAloudResume": "继续朗读",
"cannotReadAloud": "暂无法朗读",
"readingAloud": "朗读中…",
"recordingPermissionDenied": "需要麦克风权限才能录音",

View File

@@ -33,6 +33,29 @@
"title": "数据与隐私"
},
"editAvatar": "编辑头像",
"personalInfo": {
"avatarPresetFailed": "设置预设头像失败",
"avatarUploadFailed": "上传头像失败",
"cancel": "取消",
"birthPlacePlaceholder": "出生地",
"birthYearPlaceholder": "出生年份",
"changeAvatar": "更换头像",
"chooseFromLibrary": "从相册选择",
"choosePreset": "预设头像",
"grewUpPlaceholder": "成长地",
"libraryPermissionDenied": "需要相册权限才能选择图片",
"nickname": "昵称",
"nicknamePlaceholder": "请输入昵称",
"nicknameRequired": "请填写昵称",
"occupationPlaceholder": "职业",
"presetPickTitle": "选择预设",
"save": "保存",
"saveFailed": "保存失败",
"savePartialBody": "昵称已更新,但下面的档案字段未能保存。请检查网络后再次点击保存。",
"savePartialTitle": "部分保存成功",
"saving": "保存中…",
"title": "个人信息"
},
"helpSupport": {
"faq": "常见问题",
"feedback": "反馈与客服",