fix(client/shell): 「我的」入口改到底部会员卡(非顶部品牌)
按反馈纠正:顶部品牌区改回静态;底部 PlanBadgeCard(套餐/会员卡)做成可点 → 打开「我的」,选中态高亮 + 末尾 chevron。桌面/平板页 golden 重生成。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@@ -36,32 +36,23 @@ class NavSidebar extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
padding: EdgeInsets.fromLTRB(dense ? 12 : 14, dense ? 14 : 18, dense ? 12 : 14, dense ? 14 : 16),
|
padding: EdgeInsets.fromLTRB(dense ? 12 : 14, dense ? 14 : 18, dense ? 12 : 14, dense ? 14 : 16),
|
||||||
child: Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: [
|
child: Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: [
|
||||||
// 品牌区(可点 → 我的/账户;选中态高亮)。「我的」已从导航列表移到此处。
|
// 品牌区(静态)
|
||||||
Material(
|
Padding(
|
||||||
color: current == NavView.account ? c.accentSubtle : Colors.transparent,
|
padding: EdgeInsets.fromLTRB(6, 2, 6, dense ? 16 : 20),
|
||||||
borderRadius: BorderRadius.circular(PangolinRadius.md),
|
child: Row(children: [
|
||||||
clipBehavior: Clip.antiAlias,
|
PangolinMark(size: dense ? 28 : 30),
|
||||||
child: InkWell(
|
SizedBox(width: dense ? 9 : 10),
|
||||||
onTap: () => ref.read(navViewProvider.notifier).state = NavView.account,
|
Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [
|
||||||
child: Padding(
|
Text(t.brand,
|
||||||
padding: EdgeInsets.fromLTRB(6, dense ? 7 : 9, 6, dense ? 7 : 9),
|
style: PangolinText.h3.copyWith(
|
||||||
child: Row(children: [
|
color: c.fg1, fontWeight: FontWeight.w700, fontSize: dense ? 16 : 17, height: 1)),
|
||||||
PangolinMark(size: dense ? 28 : 30),
|
const SizedBox(height: 3),
|
||||||
SizedBox(width: dense ? 9 : 10),
|
Text('PANGOLIN',
|
||||||
Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [
|
style: PangolinText.caption.copyWith(
|
||||||
Text(t.brand,
|
color: c.accent, fontWeight: FontWeight.w600, fontSize: 9, letterSpacing: 1.6)),
|
||||||
style: PangolinText.h3.copyWith(
|
]),
|
||||||
color: c.fg1, fontWeight: FontWeight.w700, fontSize: dense ? 16 : 17, height: 1)),
|
]),
|
||||||
const SizedBox(height: 3),
|
|
||||||
Text('PANGOLIN',
|
|
||||||
style: PangolinText.caption.copyWith(
|
|
||||||
color: c.accent, fontWeight: FontWeight.w600, fontSize: 9, letterSpacing: 1.6)),
|
|
||||||
]),
|
|
||||||
]),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
SizedBox(height: dense ? 12 : 16),
|
|
||||||
// Nav 列表
|
// Nav 列表
|
||||||
for (final item in items)
|
for (final item in items)
|
||||||
Padding(
|
Padding(
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|||||||
import '../pangolin_theme.dart';
|
import '../pangolin_theme.dart';
|
||||||
import '../state/account_providers.dart';
|
import '../state/account_providers.dart';
|
||||||
import '../state/app_providers.dart';
|
import '../state/app_providers.dart';
|
||||||
|
import '../state/navigation_provider.dart';
|
||||||
import 'pangolin_icons.dart';
|
import 'pangolin_icons.dart';
|
||||||
|
|
||||||
class PlanBadgeCard extends ConsumerWidget {
|
class PlanBadgeCard extends ConsumerWidget {
|
||||||
@@ -19,19 +20,27 @@ class PlanBadgeCard extends ConsumerWidget {
|
|||||||
final t = ref.watch(appTextProvider);
|
final t = ref.watch(appTextProvider);
|
||||||
final isFree = ref.watch(isFreePlanProvider);
|
final isFree = ref.watch(isFreePlanProvider);
|
||||||
final exp = ref.watch(meProvider).valueOrNull?.expiresAt;
|
final exp = ref.watch(meProvider).valueOrNull?.expiresAt;
|
||||||
|
// 「我的」入口:点会员卡进账户页;选中态高亮。
|
||||||
|
final active = ref.watch(navViewProvider) == NavView.account;
|
||||||
String two(int v) => v.toString().padLeft(2, '0');
|
String two(int v) => v.toString().padLeft(2, '0');
|
||||||
final expLine = exp == null
|
final expLine = exp == null
|
||||||
? t.expires
|
? t.expires
|
||||||
: '${t.expires} ${exp.toLocal().year}-${two(exp.toLocal().month)}-${two(exp.toLocal().day)}';
|
: '${t.expires} ${exp.toLocal().year}-${two(exp.toLocal().month)}-${two(exp.toLocal().day)}';
|
||||||
|
|
||||||
return Container(
|
return Material(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 11, vertical: 9),
|
color: Colors.transparent,
|
||||||
decoration: BoxDecoration(
|
borderRadius: BorderRadius.circular(PangolinRadius.md),
|
||||||
color: c.surface,
|
clipBehavior: Clip.antiAlias,
|
||||||
border: Border.all(color: c.border),
|
child: InkWell(
|
||||||
borderRadius: BorderRadius.circular(PangolinRadius.md),
|
onTap: () => ref.read(navViewProvider.notifier).state = NavView.account,
|
||||||
),
|
child: Container(
|
||||||
child: Row(children: [
|
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(
|
Container(
|
||||||
width: 30,
|
width: 30,
|
||||||
height: 30,
|
height: 30,
|
||||||
@@ -64,7 +73,10 @@ class PlanBadgeCard extends ConsumerWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Icon(PangolinIcons.chevronRight, size: 15, color: c.fg3),
|
||||||
]),
|
]),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |