feat(app): 客户端展示多语言并支持筛选分页
This commit is contained in:
1 parent
8481611372
commit
8b50b5bd06
68 files changed
+2742
-1120
No files matched your search
@@ -99,9 +99,9 @@ class HomeDramaCard extends StatelessWidget {
|
||||
children: [
|
||||
_cover(),
|
||||
const SizedBox(height: _coverTitleGap),
|
||||
_title(),
|
||||
_title(context),
|
||||
const SizedBox(height: _lineGap),
|
||||
_genre(),
|
||||
_genre(context),
|
||||
const SizedBox(height: _lineGap),
|
||||
_metadata(),
|
||||
],
|
||||
@@ -211,9 +211,9 @@ class HomeDramaCard extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _title() {
|
||||
Widget _title(BuildContext context) {
|
||||
return Text(
|
||||
drama.title,
|
||||
drama.localizedTitle(Localizations.localeOf(context).languageCode),
|
||||
key: Key('home-drama-title-${drama.id}'),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -225,8 +225,11 @@ class HomeDramaCard extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _genre() {
|
||||
final genre = drama.genre.isEmpty ? drama.category : drama.genre;
|
||||
Widget _genre(BuildContext context) {
|
||||
final labels = drama.localizedTypeLabels(Localizations.localeOf(context).languageCode);
|
||||
final genre = labels.isEmpty
|
||||
? (drama.genre.isEmpty ? drama.category : drama.genre)
|
||||
: labels.join(' / ');
|
||||
return Text(
|
||||
genre.isEmpty ? l10n.videoPending : genre,
|
||||
key: Key('home-drama-genre-${drama.id}'),
|
||||
|
||||
Reference in new issue
Block a user