feat(ui): 更新品牌启动页与选集交互
This commit is contained in:
1 parent
4778ce2c75
commit
c1cb7d1c11
87 files changed
+919
-552
No files matched your search
@@ -9,6 +9,7 @@ import '../../core/config/locale_controller.dart';
|
||||
import '../../core/data/models/drama.dart';
|
||||
import '../../core/data/models/watch_progress.dart';
|
||||
import '../../core/data/repositories/watch_history_repository.dart';
|
||||
import '../../core/theme/app_colors.dart';
|
||||
import '../../core/widgets/server_endpoint_dialog.dart';
|
||||
import '../../l10n/app_localizations.dart';
|
||||
|
||||
@@ -120,7 +121,7 @@ class MineLogic extends ChangeNotifier {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
await showModalBottomSheet<void>(
|
||||
context: context,
|
||||
backgroundColor: const Color(0xFF1C1D22),
|
||||
backgroundColor: AppColors.ink,
|
||||
showDragHandle: true,
|
||||
isScrollControlled: true,
|
||||
builder: (sheetContext) => SafeArea(
|
||||
|
||||
@@ -158,7 +158,7 @@ class _MyPageState extends State<MyPage> {
|
||||
data: AppTheme.dark(),
|
||||
child: widget.embedded
|
||||
? content
|
||||
: Scaffold(backgroundColor: const Color(0xFF0B0C10), body: content),
|
||||
: Scaffold(backgroundColor: AppColors.ink, body: content),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ class _MyPageState extends State<MyPage> {
|
||||
const SizedBox(width: 6),
|
||||
const CircleAvatar(
|
||||
radius: 14,
|
||||
backgroundColor: Color(0xFF2C2D33),
|
||||
backgroundColor: AppColors.raised,
|
||||
child: Icon(Icons.person_rounded, color: Colors.white, size: 19),
|
||||
),
|
||||
],
|
||||
@@ -229,7 +229,7 @@ class _MyPageState extends State<MyPage> {
|
||||
children: [
|
||||
const CircleAvatar(
|
||||
radius: 28,
|
||||
backgroundColor: Color(0xFF32343A),
|
||||
backgroundColor: AppColors.raised,
|
||||
child: Icon(Icons.person_rounded, color: Colors.white, size: 30),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
@@ -269,7 +269,7 @@ class _MyPageState extends State<MyPage> {
|
||||
children: [
|
||||
const CircleAvatar(
|
||||
radius: 28,
|
||||
backgroundColor: Color(0xFF32343A),
|
||||
backgroundColor: AppColors.raised,
|
||||
child: Icon(Icons.person_rounded, color: Colors.white, size: 30),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
@@ -297,7 +297,7 @@ class _MyPageState extends State<MyPage> {
|
||||
TextButton(
|
||||
onPressed: widget.onSignOut ?? () => _mockSnack(l10n),
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: const Color(0xFF2A2C33),
|
||||
backgroundColor: AppColors.raised,
|
||||
foregroundColor: Colors.white,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8),
|
||||
shape: const StadiumBorder(),
|
||||
@@ -312,7 +312,7 @@ class _MyPageState extends State<MyPage> {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(14),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF17191F),
|
||||
color: AppColors.card,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Column(
|
||||
@@ -330,7 +330,7 @@ class _MyPageState extends State<MyPage> {
|
||||
label: l10n.coins,
|
||||
value: '\$ 0',
|
||||
action: l10n.topUpWallet,
|
||||
color: AppColors.blue,
|
||||
color: AppColors.gold,
|
||||
onPressed: () => _mockSnack(l10n),
|
||||
),
|
||||
),
|
||||
@@ -340,7 +340,7 @@ class _MyPageState extends State<MyPage> {
|
||||
label: l10n.vipMembership,
|
||||
value: l10n.notActive,
|
||||
action: l10n.joinVip,
|
||||
color: const Color(0xFFF5C451),
|
||||
color: AppColors.blue,
|
||||
onPressed: () => _mockSnack(l10n),
|
||||
),
|
||||
),
|
||||
@@ -367,7 +367,7 @@ class _MyPageState extends State<MyPage> {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF12141A),
|
||||
color: AppColors.ink,
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
border: Border.all(color: color.withValues(alpha: 0.45)),
|
||||
),
|
||||
@@ -389,7 +389,7 @@ class _MyPageState extends State<MyPage> {
|
||||
backgroundColor: color,
|
||||
foregroundColor: color == AppColors.blue
|
||||
? Colors.white
|
||||
: const Color(0xFF2A2110),
|
||||
: AppColors.onGold,
|
||||
visualDensity: VisualDensity.compact,
|
||||
shape: const StadiumBorder(),
|
||||
),
|
||||
@@ -403,7 +403,7 @@ class _MyPageState extends State<MyPage> {
|
||||
|
||||
Widget _menuCard(AppLocalizations l10n) {
|
||||
return Material(
|
||||
color: const Color(0xFF17191F),
|
||||
color: AppColors.card,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: Column(
|
||||
@@ -420,7 +420,7 @@ class _MyPageState extends State<MyPage> {
|
||||
),
|
||||
onTap: () => _mockSnack(l10n),
|
||||
),
|
||||
const Divider(height: 1, color: Color(0xFF2A2C33)),
|
||||
const Divider(height: 1, color: AppColors.outlineVariantDark),
|
||||
ListTile(
|
||||
key: const Key('mine-notices'),
|
||||
leading: const Icon(
|
||||
@@ -433,7 +433,7 @@ class _MyPageState extends State<MyPage> {
|
||||
MaterialPageRoute(builder: (_) => const NoticesPage()),
|
||||
),
|
||||
),
|
||||
const Divider(height: 1, color: Color(0xFF2A2C33)),
|
||||
const Divider(height: 1, color: AppColors.outlineVariantDark),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.history_rounded,
|
||||
@@ -445,7 +445,7 @@ class _MyPageState extends State<MyPage> {
|
||||
MaterialPageRoute(builder: (_) => const WatchRecordsPage()),
|
||||
),
|
||||
),
|
||||
const Divider(height: 1, color: Color(0xFF2A2C33)),
|
||||
const Divider(height: 1, color: AppColors.outlineVariantDark),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.favorite_outline_rounded,
|
||||
@@ -457,7 +457,7 @@ class _MyPageState extends State<MyPage> {
|
||||
MaterialPageRoute(builder: (_) => const FavoritesPage()),
|
||||
),
|
||||
),
|
||||
const Divider(height: 1, color: Color(0xFF2A2C33)),
|
||||
const Divider(height: 1, color: AppColors.outlineVariantDark),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.download_outlined,
|
||||
@@ -469,7 +469,7 @@ class _MyPageState extends State<MyPage> {
|
||||
MaterialPageRoute(builder: (_) => const DownloadsPage()),
|
||||
),
|
||||
),
|
||||
const Divider(height: 1, color: Color(0xFF2A2C33)),
|
||||
const Divider(height: 1, color: AppColors.outlineVariantDark),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.settings_rounded,
|
||||
@@ -530,8 +530,8 @@ class _MyPageState extends State<MyPage> {
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: logic.section == index
|
||||
? AppColors.bluePressed
|
||||
: const Color(0xFF24262E),
|
||||
? AppColors.blue
|
||||
: AppColors.raised,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: Text(
|
||||
@@ -564,8 +564,8 @@ class _MyPageState extends State<MyPage> {
|
||||
onSelected: (_) => logic.selectFilter(index),
|
||||
showCheckmark: false,
|
||||
visualDensity: VisualDensity.compact,
|
||||
backgroundColor: const Color(0xFF242328),
|
||||
selectedColor: _accent,
|
||||
backgroundColor: AppColors.raised,
|
||||
selectedColor: AppColors.blue,
|
||||
labelStyle: TextStyle(
|
||||
color: logic.filter == index
|
||||
? Colors.white
|
||||
@@ -592,7 +592,7 @@ class _MyPageState extends State<MyPage> {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(9),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF1B1C21),
|
||||
color: AppColors.card,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Row(
|
||||
@@ -635,7 +635,7 @@ class _MyPageState extends State<MyPage> {
|
||||
),
|
||||
const CircleAvatar(
|
||||
radius: 15,
|
||||
backgroundColor: Color(0xFF313137),
|
||||
backgroundColor: AppColors.raised,
|
||||
child: Icon(
|
||||
Icons.play_arrow_rounded,
|
||||
color: _accent,
|
||||
@@ -658,21 +658,12 @@ class _MyPageState extends State<MyPage> {
|
||||
),
|
||||
)
|
||||
else if (isWatchlist && favorites.error != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 18),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
errorText(l10n, favorites.error, l10n.favoritesError),
|
||||
style: const TextStyle(color: Color(0xFFE6E1E3)),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => unawaited(favorites.load()),
|
||||
child: Text(l10n.retry),
|
||||
),
|
||||
],
|
||||
),
|
||||
EmptyState(
|
||||
icon: Icons.cloud_off_rounded,
|
||||
title: errorText(l10n, favorites.error, l10n.favoritesError),
|
||||
actionLabel: l10n.retry,
|
||||
onAction: () => unawaited(favorites.load()),
|
||||
compact: true,
|
||||
)
|
||||
else if (logic.section != 0 && markedDramas.isNotEmpty)
|
||||
for (final drama in markedDramas) ...[
|
||||
@@ -789,7 +780,7 @@ class _MyPageState extends State<MyPage> {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(9),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF1B1C21),
|
||||
color: AppColors.card,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Row(
|
||||
@@ -832,8 +823,8 @@ class _MyPageState extends State<MyPage> {
|
||||
Widget _bottomNav(AppLocalizations l10n) => Container(
|
||||
height: 63,
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xFF0D0D11),
|
||||
border: Border(top: BorderSide(color: Color(0xFF242329))),
|
||||
color: AppColors.bar,
|
||||
border: Border(top: BorderSide(color: AppColors.outlineVariantDark)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
@@ -898,12 +889,12 @@ class _NavItem extends StatelessWidget {
|
||||
Icon(
|
||||
icon,
|
||||
size: 21,
|
||||
color: selected ? _accent : const Color(0xFFCAC4C7),
|
||||
color: selected ? _accent : AppColors.muted,
|
||||
),
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: selected ? _accent : const Color(0xFFCAC4C7),
|
||||
color: selected ? _accent : AppColors.muted,
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user