Merge upstream/dev (35 commits) into tth

Conflicts in lib/widgets/mesh_nav_tile.dart and lib/widgets/mesh_ui.dart:
took upstream's iconSlot/ThemedIcon, busy spinner and SectionHeader
description, and re-applied the terminal theme on top (18 dp icons,
narrower gaps and padding, mono section labels).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-11-24 11:47:28 +01:00
commit ceab62428a
103 files changed
+13328 -5463

No files matched your search

+77 -27
View File
@@ -13,52 +13,71 @@ import 'contact_visuals.dart';
/// MeshCore shared design kit.
///
/// Building blocks used across all screens so the app reads as one product:
/// [SectionHeader], [MeshCard], [StatusChip], [StatTile], [AvatarCircle],
/// [SectionHeader], [MeshCard], [MeshInfoCard], [StatusChip], [StatTile],
/// [AvatarCircle],
/// [SignalBars], [RouteChip], [PulseDot], [BottomSheetHeader] +
/// [showMeshSheet], [ErrorRetryCard], [ListEntrance], [MeshSegmentLabel]
/// and [MeshMenuItemRow].
/// Small-caps mono section label, optionally with a trailing widget.
/// Small-caps mono section label, optionally with a trailing widget and a
/// short [description] under it.
class SectionHeader extends StatelessWidget {
final String label;
final Widget? trailing;
final String? description;
final EdgeInsetsGeometry padding;
const SectionHeader(
this.label, {
super.key,
this.trailing,
this.description,
this.padding = const EdgeInsets.fromLTRB(16, 20, 16, 8),
});
@override
Widget build(BuildContext context) {
final scheme = Theme.of(context).colorScheme;
return Padding(
padding: MeshStyle.of(context).terminal
? const EdgeInsets.fromLTRB(8, 10, 8, 2)
: padding,
child: Row(
children: [
Expanded(
child: Text(
label.toUpperCase(),
style: MeshStyle.of(context).terminal
? MeshTheme.mono(
color: scheme.onSurfaceVariant,
fontSize: 12,
fontWeight: FontWeight.w700,
)
: MeshTheme.accentLabel(
color: scheme.onSurfaceVariant,
fontSize: 13,
),
overflow: TextOverflow.ellipsis,
),
final theme = Theme.of(context);
final scheme = theme.colorScheme;
final terminal = MeshStyle.of(context).terminal;
final row = Row(
children: [
Expanded(
child: Text(
label.toUpperCase(),
style: terminal
? MeshTheme.mono(
color: scheme.onSurfaceVariant,
fontSize: 12,
fontWeight: FontWeight.w700,
)
: MeshTheme.accentLabel(
color: scheme.onSurfaceVariant,
fontSize: 13,
),
overflow: TextOverflow.ellipsis,
),
?trailing,
],
),
),
?trailing,
],
);
return Padding(
padding: terminal ? const EdgeInsets.fromLTRB(8, 10, 8, 2) : padding,
child: description == null
? row
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
row,
const SizedBox(height: 4),
Text(
description!,
style: theme.textTheme.bodyMedium?.copyWith(
color: scheme.onSurfaceVariant,
),
),
],
),
);
}
}
@@ -127,6 +146,37 @@ class MeshCard extends StatelessWidget {
}
}
/// [MeshCard] with an info icon and a short note, for the top of a page.
class MeshInfoCard extends StatelessWidget {
final String text;
const MeshInfoCard(this.text, {super.key});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final scheme = theme.colorScheme;
return MeshCard(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.info_outline, size: 24, color: scheme.onSurfaceVariant),
const SizedBox(width: 16),
Expanded(
child: Text(
text,
style: theme.textTheme.bodyMedium?.copyWith(
color: scheme.onSurface,
),
),
),
],
),
);
}
}
/// Tinted pill chip for statuses: a dot or icon plus a short label.
/// Contrast ratio between two opaque colors (WCAG definition).
double meshContrastRatio(Color a, Color b) {