mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
feat: Refresh generated API snapshots #0
This commit is contained in:
@@ -5,22 +5,22 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000253">
|
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.00043">
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="1: increment_build_number" time="0.303267">
|
<testcase classname="fastlane.lanes" name="1: increment_build_number" time="0.324798">
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="2: build_app" time="131.526213">
|
<testcase classname="fastlane.lanes" name="2: build_app" time="128.448727">
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="3: upload_to_app_store" time="206.79174">
|
<testcase classname="fastlane.lanes" name="3: upload_to_app_store" time="4490.078943">
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -11,62 +11,47 @@ class TrafficStatsReportingSection extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
|
final colorScheme = theme.colorScheme;
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
SwitchListTile(
|
SwitchListTile(
|
||||||
secondary: const Icon(Icons.cloud_upload_outlined),
|
dense: true,
|
||||||
title: const Text('Anonymous RX stats reporting'),
|
secondary: const Icon(Icons.cloud_upload_outlined, size: 20),
|
||||||
|
title: const Text('Anonymous RX stats'),
|
||||||
subtitle: const Text(
|
subtitle: const Text(
|
||||||
'Upload RX live-traffic packet type and path mode totals to the fixed Cloudflare worker every 5 minutes.',
|
'Upload packet totals every 5 min',
|
||||||
),
|
),
|
||||||
value: service.isEnabled,
|
value: service.isEnabled,
|
||||||
onChanged: (value) async {
|
onChanged: (value) async {
|
||||||
await service.setEnabled(value);
|
await service.setEnabled(value);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Padding(
|
if (service.isEnabled)
|
||||||
padding: const EdgeInsets.fromLTRB(16, 0, 16, 16),
|
Padding(
|
||||||
child: DecoratedBox(
|
padding: const EdgeInsets.fromLTRB(16, 4, 16, 8),
|
||||||
decoration: BoxDecoration(
|
child: Row(
|
||||||
color: theme.colorScheme.surfaceContainerLow,
|
children: [
|
||||||
borderRadius: BorderRadius.circular(12),
|
Expanded(
|
||||||
border: Border.all(
|
child: Text(
|
||||||
color: theme.colorScheme.outlineVariant.withValues(alpha: 0.5),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(12),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'Upload status',
|
|
||||||
style: theme.textTheme.titleSmall,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
Text(
|
|
||||||
_statusText(service),
|
_statusText(service),
|
||||||
style: theme.textTheme.bodyMedium,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 6),
|
|
||||||
Text(
|
|
||||||
'Ingest URL: ${TrafficStatsReportingService.ingestUri}',
|
|
||||||
style: theme.textTheme.bodySmall?.copyWith(
|
style: theme.textTheme.bodySmall?.copyWith(
|
||||||
color: theme.colorScheme.onSurfaceVariant,
|
color: colorScheme.onSurfaceVariant,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
),
|
||||||
TextButton.icon(
|
TextButton.icon(
|
||||||
onPressed: _openStatsDashboard,
|
onPressed: _openStatsDashboard,
|
||||||
icon: const Icon(Icons.open_in_new),
|
icon: const Icon(Icons.open_in_new, size: 16),
|
||||||
label: const Text('View public stats'),
|
label: const Text('View'),
|
||||||
|
style: TextButton.styleFrom(
|
||||||
|
visualDensity: VisualDensity.compact,
|
||||||
|
textStyle: theme.textTheme.labelSmall,
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -79,21 +64,15 @@ class TrafficStatsReportingSection extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static String _statusText(TrafficStatsReportingService service) {
|
static String _statusText(TrafficStatsReportingService service) {
|
||||||
final buffer = StringBuffer();
|
final parts = <String>[];
|
||||||
buffer.write('Pending uploads: ${service.pendingUploadCount}');
|
parts.add('Pending: ${service.pendingUploadCount}');
|
||||||
if (service.lastSuccessAt != null) {
|
if (service.lastSuccessAt != null) {
|
||||||
buffer.write(
|
parts.add('Sent: ${_formatDateTime(service.lastSuccessAt!.toLocal())}');
|
||||||
'\nLast sent: ${_formatDateTime(service.lastSuccessAt!.toLocal())}',
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
buffer.write('\nLast sent: Never');
|
|
||||||
}
|
}
|
||||||
if (service.lastError != null && service.lastError!.isNotEmpty) {
|
if (service.lastError != null && service.lastError!.isNotEmpty) {
|
||||||
buffer.write('\nLast error: ${service.lastError}');
|
parts.add('Error: ${service.lastError}');
|
||||||
} else {
|
|
||||||
buffer.write('\nLast error: None');
|
|
||||||
}
|
}
|
||||||
return buffer.toString();
|
return parts.join(' · ');
|
||||||
}
|
}
|
||||||
|
|
||||||
static String _formatDateTime(DateTime value) {
|
static String _formatDateTime(DateTime value) {
|
||||||
@@ -101,7 +80,6 @@ class TrafficStatsReportingSection extends StatelessWidget {
|
|||||||
final day = value.day.toString().padLeft(2, '0');
|
final day = value.day.toString().padLeft(2, '0');
|
||||||
final hour = value.hour.toString().padLeft(2, '0');
|
final hour = value.hour.toString().padLeft(2, '0');
|
||||||
final minute = value.minute.toString().padLeft(2, '0');
|
final minute = value.minute.toString().padLeft(2, '0');
|
||||||
final second = value.second.toString().padLeft(2, '0');
|
return '${value.year}-$month-$day $hour:$minute';
|
||||||
return '${value.year}-$month-$day $hour:$minute:$second';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user