feat: refine AI navigation and accessibility recovery

This commit is contained in:
2026-08-26 22:58:26 +08:00
parent c6f98b5445
commit 9ccbdfead4
15 changed files with 521 additions and 203 deletions
+10 -1
View File
@@ -16,7 +16,10 @@ import 'package:miaoji_zhang/shared/services/session_store.dart';
enum _ReportKind { weekly, monthly, yearly }
class ReportPage extends StatefulWidget {
const ReportPage({super.key});
final String? initialPeriod;
final DateTime? initialAnchor;
const ReportPage({super.key, this.initialPeriod, this.initialAnchor});
@override
State<ReportPage> createState() => _ReportPageState();
@@ -33,6 +36,12 @@ class _ReportPageState extends State<ReportPage> {
@override
void initState() {
super.initState();
_anchor = widget.initialAnchor ?? ShanghaiTime.now;
_kind = switch (widget.initialPeriod) {
'week' => _ReportKind.weekly,
'year' => _ReportKind.yearly,
_ => _ReportKind.monthly,
};
PublicConfigApi.companionNotifier.addListener(_refreshCompanion);
CurrentLedgerStore.instance.addListener(_load);
unawaited(_load());