From 95b664294929e9bf1c4ced9dddb8cd78f89b65b9 Mon Sep 17 00:00:00 2001 From: flemming-it Date: Fri, 19 Jun 2026 02:53:34 +0200 Subject: [PATCH] fix(ui): landing copy reflects real mode (live hub is the default) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The landing CTA hard-coded 'Demo-Modus' and 'Live-Hub-Anbindung folgt in Woche 1' — stale now that live mode is the default and works. CTA is just 'App öffnen'; the subtitle + version line read the resolved repository.mode (Live-Hub / Hub offline / Demo-Modus). Verified in-browser: opening the app fires 5 Submit RPCs (200) for the 5 live norms over gRPC-web. Signed-off-by: flemming-it --- app/lib/pages/landing_page.dart | 22 +++++++++++++++++----- app/test/widget_test.dart | 4 ++-- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/app/lib/pages/landing_page.dart b/app/lib/pages/landing_page.dart index 50fba50..93c7956 100644 --- a/app/lib/pages/landing_page.dart +++ b/app/lib/pages/landing_page.dart @@ -8,7 +8,8 @@ import '../widgets/delta_mark.dart'; import 'shell_page.dart'; /// First-run landing: brand mark, one-line claim, "enter app" CTA. -/// Mock-mode bypasses Hub connect; the live wire lands in week 1. +/// The CTA carries the resolved [repository] (live hub by default, +/// demo when the Hub-Reiter opts out) — the subtitle reflects which. class LandingPage extends StatelessWidget { const LandingPage({super.key, required this.repository}); @@ -17,6 +18,18 @@ class LandingPage extends StatelessWidget { @override Widget build(BuildContext context) { final t = Theme.of(context).textTheme; + final live = repository.mode == 'hub-live'; + final down = repository.mode == 'hub-down'; + final modeLabel = live + ? 'Live-Hub' + : down + ? 'Hub offline' + : 'Demo-Modus'; + final subtitle = live + ? '5 Pilot-Normen, live aus dem Hub ausgewertet' + : down + ? 'Hub nicht erreichbar — im Hub-Reiter auf Demo umschalten' + : 'Demo: 5 Pilot-Normen, ohne Hub-Verbindung'; return Scaffold( body: SafeArea( child: Center( @@ -66,10 +79,10 @@ class LandingPage extends StatelessWidget { ); }, icon: const Icon(Icons.east), - label: const Text('App öffnen (Demo-Modus)'), + label: const Text('App öffnen'), ), Text( - 'Demo: 5 Pilot-Normen, ohne Hub-Verbindung', + subtitle, style: t.labelSmall?.copyWith( color: ReclaimColors.mute, ), @@ -78,8 +91,7 @@ class LandingPage extends StatelessWidget { ), const SizedBox(height: ReclaimSpace.xl), Text( - 'v0.1.0 · Phase 0 · Mock-Modus · ' - 'Live-Hub-Anbindung folgt in Woche 1', + 'v0.1.0 · Phase 0 · $modeLabel', style: ReclaimTheme.mono( t.labelSmall ?? const TextStyle(), ).copyWith(color: ReclaimColors.mute), diff --git a/app/test/widget_test.dart b/app/test/widget_test.dart index 30b5b41..712e78a 100644 --- a/app/test/widget_test.dart +++ b/app/test/widget_test.dart @@ -23,7 +23,7 @@ void main() { await tester.pump(); expect(find.byType(BrandWordmark), findsWidgets); expect( - find.widgetWithText(FilledButton, 'App öffnen (Demo-Modus)'), + find.widgetWithText(FilledButton, 'App öffnen'), findsOneWidget, ); await tester.pumpWidget(const SizedBox.shrink()); @@ -35,7 +35,7 @@ void main() { await tester.pumpWidget(const ReclaimApp()); await tester.pump(); await tester.tap( - find.widgetWithText(FilledButton, 'App öffnen (Demo-Modus)'), + find.widgetWithText(FilledButton, 'App öffnen'), ); await tester.pump(); await tester.pump(const Duration(milliseconds: 600));