feat(app): 客户端展示多语言并支持筛选分页

This commit is contained in:
Zhou Weidong committed 2026-10-24 17:20:24 +08:00
1 parent 8481611372
commit 8b50b5bd06
68 files changed
+2742 -1120

No files matched your search

@@ -16,7 +16,7 @@ class SearchResultCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final tags = _tags();
final tags = _tags(context);
return Material(
key: Key('search-result-card-${drama.id}'),
color: AppColors.transparent,
@@ -60,7 +60,7 @@ class SearchResultCard extends StatelessWidget {
),
const SizedBox(height: AppDimens.searchResultTitleGap),
Text(
drama.title,
drama.localizedTitle(Localizations.localeOf(context).languageCode),
key: Key('search-result-title-${drama.id}'),
maxLines: 2,
overflow: TextOverflow.ellipsis,
@@ -92,7 +92,9 @@ class SearchResultCard extends StatelessWidget {
);
}
List<String> _tags() {
List<String> _tags(BuildContext context) {
final localized = drama.localizedTypeLabels(Localizations.localeOf(context).languageCode);
if (localized.isNotEmpty) return localized.take(3).toList(growable: false);
final seen = <String>{};
return [drama.genre, drama.category]
.expand((value) => value.split(RegExp(r'[,/、·]')))