feat(ui): 更新品牌启动页与选集交互

This commit is contained in:
Zhou Weidong committed 2026-10-19 09:28:16 +08:00
1 parent 4778ce2c75
commit c1cb7d1c11
87 files changed
+919 -552

No files matched your search

+10 -34
View File
@@ -54,9 +54,9 @@ class _DownloadsPageState extends State<DownloadsPage> {
data: AppTheme.dark(),
child: Scaffold(
key: const Key('downloads-page'),
backgroundColor: const Color(0xFF0B0C10),
backgroundColor: AppColors.ink,
appBar: AppBar(
backgroundColor: const Color(0xFF0B0C10),
backgroundColor: AppColors.ink,
foregroundColor: Colors.white,
title: Text(l10n.downloads),
),
@@ -79,41 +79,17 @@ class _DownloadsBody extends StatelessWidget {
if (downloads.loading && downloads.policy == null) {
return const Center(child: CircularProgressIndicator());
}
if (downloads.error != null && downloads.policy == null) {
return Center(
if (downloads.policy == null) {
return EmptyState(
key: const Key('downloads-error'),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 32),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
errorText(l10n, downloads.error, l10n.downloadsError),
textAlign: TextAlign.center,
style: const TextStyle(color: Colors.white70),
),
const SizedBox(height: 14),
FilledButton(
key: const Key('downloads-retry'),
onPressed: () => unawaited(downloads.load()),
child: Text(l10n.retry),
),
],
),
),
);
}
final policy = downloads.policy;
if (policy == null) {
return Center(
key: const Key('downloads-error'),
child: FilledButton(
key: const Key('downloads-retry'),
onPressed: () => unawaited(downloads.load()),
child: Text(l10n.retry),
),
icon: Icons.cloud_off_rounded,
title: errorText(l10n, downloads.error, l10n.downloadsError),
actionLabel: l10n.retry,
actionKey: const Key('downloads-retry'),
onAction: () => unawaited(downloads.load()),
);
}
final policy = downloads.policy!;
return RefreshIndicator(
onRefresh: downloads.load,
child: ListView(