feat(apps): 重构 UI 架构为 presentation 层并新增 l10n 国际化支持
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import '../../../../core/l10n/l10n.dart';
|
||||
|
||||
class PersonMeta {
|
||||
final String? source;
|
||||
final double? confidence;
|
||||
@@ -546,15 +548,15 @@ class UserMemoryContent {
|
||||
parts.add(occupation!);
|
||||
}
|
||||
if (people.isNotEmpty) {
|
||||
parts.add('${people.length} 位联系人');
|
||||
parts.add(L10n.current.memorySummaryContactsCount(people.length));
|
||||
}
|
||||
if (places.isNotEmpty) {
|
||||
parts.add('${places.length} 个地点');
|
||||
parts.add(L10n.current.memorySummaryPlacesCount(places.length));
|
||||
}
|
||||
if (interests.isNotEmpty) {
|
||||
parts.add('${interests.length} 个兴趣');
|
||||
parts.add(L10n.current.memorySummaryInterestsCount(interests.length));
|
||||
}
|
||||
return parts.isEmpty ? '暂无信息' : parts.join(' · ');
|
||||
return parts.isEmpty ? L10n.current.memoryNoInfo : parts.join(' · ');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -916,15 +918,17 @@ class WorkProfileContent {
|
||||
parts.add(occupation!);
|
||||
}
|
||||
if (expertise.isNotEmpty) {
|
||||
parts.add('${expertise.length} 项专长');
|
||||
parts.add(L10n.current.memorySummaryExpertiseCount(expertise.length));
|
||||
}
|
||||
if (currentProjects.isNotEmpty) {
|
||||
parts.add('${currentProjects.length} 个项目');
|
||||
parts.add(
|
||||
L10n.current.memorySummaryProjectsCount(currentProjects.length),
|
||||
);
|
||||
}
|
||||
if (teamMembers.isNotEmpty) {
|
||||
parts.add('${teamMembers.length} 位团队成员');
|
||||
parts.add(L10n.current.memorySummaryTeamMembersCount(teamMembers.length));
|
||||
}
|
||||
return parts.isEmpty ? '暂无信息' : parts.join(' · ');
|
||||
return parts.isEmpty ? L10n.current.memoryNoInfo : parts.join(' · ');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import 'package:social_app/core/api/i_api_client.dart';
|
||||
import 'package:social_app/core/network/i_api_client.dart';
|
||||
import '../models/automation_job_model.dart';
|
||||
|
||||
class AutomationJobsApi {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import 'package:social_app/core/api/i_api_client.dart';
|
||||
import 'package:social_app/core/network/i_api_client.dart';
|
||||
import '../models/memory_models.dart';
|
||||
|
||||
class MemoryService {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'dart:async';
|
||||
|
||||
import '../../../users/data/models/user_response.dart';
|
||||
import '../../../contacts/data/users/models/user_response.dart';
|
||||
import 'user_profile_cache_repository.dart';
|
||||
|
||||
class SettingsUserCache {
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'dart:async';
|
||||
import '../../../../core/cache/cache_entry.dart';
|
||||
import '../../../../core/cache/cache_policy.dart';
|
||||
import '../../../../core/cache/hybrid_cache_store.dart';
|
||||
import '../../../users/data/models/user_response.dart';
|
||||
import '../../../contacts/data/users/models/user_response.dart';
|
||||
|
||||
class UserProfileCacheRepository {
|
||||
static const String cacheKey = 'settings:user_profile';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import 'package:social_app/core/api/i_api_client.dart';
|
||||
import 'package:social_app/core/network/i_api_client.dart';
|
||||
|
||||
class AppVersionResponse {
|
||||
final bool hasUpdate;
|
||||
|
||||
Reference in New Issue
Block a user