diff --git a/lib/main.dart b/lib/main.dart index 4cb8c5f..0bb6c77 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -23,7 +23,7 @@ import 'widgets/widgets.dart'; /// Studio's own build version. Bump on every UI commit so the /// running app self-identifies — visible in the sidebar header /// and quick-glance proof that you're seeing the current build. -const String kStudioVersion = '0.14.0'; +const String kStudioVersion = '0.14.1'; Future main() async { WidgetsFlutterBinding.ensureInitialized(); diff --git a/lib/pages/audit.dart b/lib/pages/audit.dart index 9e83456..dd3ba1a 100644 --- a/lib/pages/audit.dart +++ b/lib/pages/audit.dart @@ -125,8 +125,29 @@ class _AuditPageState extends State { ); } - String _formatTime(DateTime ts) => - '${ts.hour.toString().padLeft(2, '0')}:${ts.minute.toString().padLeft(2, '0')}:${ts.second.toString().padLeft(2, '0')}'; + /// Render the event timestamp so the operator never has to + /// guess what day "21:25" was. Same-day events keep the + /// compact `HH:mm:ss` form; older events get a `MM-dd` prefix + /// or a full `YYYY-MM-dd` for last year's tail of the log. + /// Always rendered in the operator's local time zone — the + /// dialog still shows the full ISO timestamp for unambiguous + /// cross-checking. + String _formatTime(DateTime ts) { + final local = ts.toLocal(); + final now = DateTime.now(); + final hh = local.hour.toString().padLeft(2, '0'); + final mm = local.minute.toString().padLeft(2, '0'); + final ss = local.second.toString().padLeft(2, '0'); + final time = '$hh:$mm:$ss'; + final sameDay = local.year == now.year && + local.month == now.month && + local.day == now.day; + if (sameDay) return time; + final mo = local.month.toString().padLeft(2, '0'); + final dd = local.day.toString().padLeft(2, '0'); + if (local.year == now.year) return '$mo-$dd $time'; + return '${local.year}-$mo-$dd $time'; + } String _contextLine(AuditEvent e) { final parts = []; diff --git a/pubspec.yaml b/pubspec.yaml index 6484194..2f43a59 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: fai_studio description: "F∆I Studio — desktop GUI for the F∆I hub" publish_to: 'none' -version: 0.14.0 +version: 0.14.1 environment: sdk: ^3.11.0-200.1.beta