feat(profile): add chat settings and language options to profile settings
All checks were successful
Frontend CI / ota-android (push) Successful in 13m7s
Frontend CI / build-and-push-web (push) Successful in 16m58s
Frontend CI / build-android-apk (push) Successful in 1h4m18s

- Introduced hrefProfileChatSettings() for navigation to chat settings.
- Updated SettingsScreen to include new settings items for chat settings, language selection, data storage, terms, and privacy policy.
- Enhanced user experience by providing alerts for language and data storage options.

This update improves the profile settings interface by adding more customization options for users.
This commit is contained in:
lafay
2026-04-01 02:17:36 +08:00
parent 20e9d69540
commit 5614b4078a
25 changed files with 2622 additions and 801 deletions

View File

@@ -228,8 +228,16 @@ class AuthService {
try {
const response = await api.get<UserResponse>('/users/me');
return response.data;
} catch (error) {
console.error('[AuthService] fetchCurrentUserFromAPI 失败:', error);
} catch (error: any) {
// 401 错误(未登录/登录过期)是预期情况,不需要打印错误日志
const isAuthError = error?.code === 401 ||
String(error?.message ?? '').includes('登录') ||
String(error?.message ?? '').includes('token') ||
String(error?.message ?? '').includes('unauthorized');
if (!isAuthError) {
console.error('[AuthService] fetchCurrentUserFromAPI 失败:', error);
}
return null;
}
}

View File

@@ -972,6 +972,9 @@ class WebSocketService {
this.connected = false;
this.isConnecting = false;
this.isFallbackMode = false;
this.reconnectAttempts = 0; // 重置重连计数
this.lastEventId = ''; // 重置事件ID
this.lastActivityAt = 0; // 重置活动时间
if (this.ws) {
this.ws.close();