From d6b388fa03f9a3d865236c09568c28f4a4b76b1c Mon Sep 17 00:00:00 2001 From: lukas-heiligenbrunner Date: Sun, 18 Feb 2024 14:22:27 +0100 Subject: [PATCH] show finished date and version --- frontend/lib/screens/build_screen.dart | 12 ++++++++---- frontend/lib/utils/colorful_tag.dart | 22 ---------------------- 2 files changed, 8 insertions(+), 26 deletions(-) delete mode 100644 frontend/lib/utils/colorful_tag.dart diff --git a/frontend/lib/screens/build_screen.dart b/frontend/lib/screens/build_screen.dart index c199b2d..cac587a 100644 --- a/frontend/lib/screens/build_screen.dart +++ b/frontend/lib/screens/build_screen.dart @@ -239,12 +239,16 @@ class _BuildScreenState extends State { textRight: buildData.id.toString(), ), SideCard( - title: "Finished", - textRight: buildData.end_time.toString(), + title: "Version", + textRight: buildData.version, ), SideCard( - title: "Queued", - textRight: "7", + title: "Finished", + textRight: buildData.end_time == null + ? "Not yet" + : DateTime.fromMillisecondsSinceEpoch( + buildData.end_time! * 1000) + .readableDuration(), ), SideCard( title: "Duration", diff --git a/frontend/lib/utils/colorful_tag.dart b/frontend/lib/utils/colorful_tag.dart deleted file mode 100644 index 025e9ed..0000000 --- a/frontend/lib/utils/colorful_tag.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'dart:ui'; - -import 'package:flutter/material.dart'; - -Color getRoleColor(String? role) { - if (role == "Doctor") { - return Colors.green; - } else if (role == "Software Architect") { - return Colors.red; - } else if (role == "Software Engineer") { - return Colors.blueAccent; - } else if (role == "Solution Architect") { - return Colors.amberAccent; - } else if (role == "Project Manager") { - return Colors.cyanAccent; - } else if (role == "Business Analyst") { - return Colors.deepPurpleAccent; - } else if (role == "UI/UX Designer") { - return Colors.indigoAccent; - } - return Colors.black38; -}