fix(client/shell): 「我的」入口改到底部会员卡(非顶部品牌)

按反馈纠正:顶部品牌区改回静态;底部 PlanBadgeCard(套餐/会员卡)做成可点 →
打开「我的」,选中态高亮 + 末尾 chevron。桌面/平板页 golden 重生成。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-28 20:33:30 +08:00
parent 09eab3b3b6
commit 2c5e8785c0
22 changed files with 36 additions and 33 deletions
+20 -8
View File
@@ -8,6 +8,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../pangolin_theme.dart';
import '../state/account_providers.dart';
import '../state/app_providers.dart';
import '../state/navigation_provider.dart';
import 'pangolin_icons.dart';
class PlanBadgeCard extends ConsumerWidget {
@@ -19,19 +20,27 @@ class PlanBadgeCard extends ConsumerWidget {
final t = ref.watch(appTextProvider);
final isFree = ref.watch(isFreePlanProvider);
final exp = ref.watch(meProvider).valueOrNull?.expiresAt;
// 「我的」入口:点会员卡进账户页;选中态高亮。
final active = ref.watch(navViewProvider) == NavView.account;
String two(int v) => v.toString().padLeft(2, '0');
final expLine = exp == null
? t.expires
: '${t.expires} ${exp.toLocal().year}-${two(exp.toLocal().month)}-${two(exp.toLocal().day)}';
return Container(
padding: const EdgeInsets.symmetric(horizontal: 11, vertical: 9),
decoration: BoxDecoration(
color: c.surface,
border: Border.all(color: c.border),
borderRadius: BorderRadius.circular(PangolinRadius.md),
),
child: Row(children: [
return Material(
color: Colors.transparent,
borderRadius: BorderRadius.circular(PangolinRadius.md),
clipBehavior: Clip.antiAlias,
child: InkWell(
onTap: () => ref.read(navViewProvider.notifier).state = NavView.account,
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 11, vertical: 9),
decoration: BoxDecoration(
color: active ? c.accentSubtle : c.surface,
border: Border.all(color: active ? c.accent : c.border),
borderRadius: BorderRadius.circular(PangolinRadius.md),
),
child: Row(children: [
Container(
width: 30,
height: 30,
@@ -64,7 +73,10 @@ class PlanBadgeCard extends ConsumerWidget {
],
),
),
Icon(PangolinIcons.chevronRight, size: 15, color: c.fg3),
]),
),
),
);
}
}