fix(ui): landing copy reflects real mode (live hub is the default)
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 <sf@flemming.it>
This commit is contained in:
parent
b4461cca13
commit
95b6642949
2 changed files with 19 additions and 7 deletions
|
|
@ -8,7 +8,8 @@ import '../widgets/delta_mark.dart';
|
||||||
import 'shell_page.dart';
|
import 'shell_page.dart';
|
||||||
|
|
||||||
/// First-run landing: brand mark, one-line claim, "enter app" CTA.
|
/// 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 {
|
class LandingPage extends StatelessWidget {
|
||||||
const LandingPage({super.key, required this.repository});
|
const LandingPage({super.key, required this.repository});
|
||||||
|
|
||||||
|
|
@ -17,6 +18,18 @@ class LandingPage extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final t = Theme.of(context).textTheme;
|
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(
|
return Scaffold(
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Center(
|
child: Center(
|
||||||
|
|
@ -66,10 +79,10 @@ class LandingPage extends StatelessWidget {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.east),
|
icon: const Icon(Icons.east),
|
||||||
label: const Text('App öffnen (Demo-Modus)'),
|
label: const Text('App öffnen'),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'Demo: 5 Pilot-Normen, ohne Hub-Verbindung',
|
subtitle,
|
||||||
style: t.labelSmall?.copyWith(
|
style: t.labelSmall?.copyWith(
|
||||||
color: ReclaimColors.mute,
|
color: ReclaimColors.mute,
|
||||||
),
|
),
|
||||||
|
|
@ -78,8 +91,7 @@ class LandingPage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const SizedBox(height: ReclaimSpace.xl),
|
const SizedBox(height: ReclaimSpace.xl),
|
||||||
Text(
|
Text(
|
||||||
'v0.1.0 · Phase 0 · Mock-Modus · '
|
'v0.1.0 · Phase 0 · $modeLabel',
|
||||||
'Live-Hub-Anbindung folgt in Woche 1',
|
|
||||||
style: ReclaimTheme.mono(
|
style: ReclaimTheme.mono(
|
||||||
t.labelSmall ?? const TextStyle(),
|
t.labelSmall ?? const TextStyle(),
|
||||||
).copyWith(color: ReclaimColors.mute),
|
).copyWith(color: ReclaimColors.mute),
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ void main() {
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
expect(find.byType(BrandWordmark), findsWidgets);
|
expect(find.byType(BrandWordmark), findsWidgets);
|
||||||
expect(
|
expect(
|
||||||
find.widgetWithText(FilledButton, 'App öffnen (Demo-Modus)'),
|
find.widgetWithText(FilledButton, 'App öffnen'),
|
||||||
findsOneWidget,
|
findsOneWidget,
|
||||||
);
|
);
|
||||||
await tester.pumpWidget(const SizedBox.shrink());
|
await tester.pumpWidget(const SizedBox.shrink());
|
||||||
|
|
@ -35,7 +35,7 @@ void main() {
|
||||||
await tester.pumpWidget(const ReclaimApp());
|
await tester.pumpWidget(const ReclaimApp());
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
await tester.tap(
|
await tester.tap(
|
||||||
find.widgetWithText(FilledButton, 'App öffnen (Demo-Modus)'),
|
find.widgetWithText(FilledButton, 'App öffnen'),
|
||||||
);
|
);
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
await tester.pump(const Duration(milliseconds: 600));
|
await tester.pump(const Duration(milliseconds: 600));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue