Allow overriding contact name

This commit is contained in:
Janez T
2026-03-13 10:16:04 +01:00
parent 5e404944e9
commit 1e70f52069
30 changed files with 2251 additions and 381 deletions

View File

@@ -345,7 +345,7 @@ class _SummaryPanel extends StatelessWidget {
label: 'RX packets',
value: '${snapshot.rxCount}',
subtitle: totalRxCount == null
? 'Last 60 sec'
? _windowSummaryLabel(snapshot.windowDuration)
: 'Device total $totalRxCount',
),
_MetricTile(
@@ -504,12 +504,15 @@ class _FilterChip extends StatelessWidget {
}
String _windowLabel(Duration duration) {
if (duration.inMinutes >= 60) {
return '${duration.inMinutes} min';
}
return '${duration.inMinutes} min';
}
String _windowSummaryLabel(Duration duration) {
final minutes = duration.inMinutes;
if (minutes == 1) return 'Last 1 min';
return 'Last $minutes min';
}
class _MetricTile extends StatelessWidget {
final String label;
final String value;
@@ -527,7 +530,7 @@ class _MetricTile extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
width: 160,
height: 128,
height: 136,
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface.withValues(alpha: 0.82),