[pve-devel] [PATCH pve-flutter-frontend 7/9] task logs: don't always say 'Last Task: '

Dominik Csapak d.csapak at proxmox.com
Fri Apr 12 10:04:56 CEST 2024


only put that when we show the last task, which is only when we show the
'more tasks' button. Make the title otherwise just 'Task: '

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 lib/widgets/pve_task_log_expansiontile_widget.dart | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/widgets/pve_task_log_expansiontile_widget.dart b/lib/widgets/pve_task_log_expansiontile_widget.dart
index a3c36fd..2073840 100644
--- a/lib/widgets/pve_task_log_expansiontile_widget.dart
+++ b/lib/widgets/pve_task_log_expansiontile_widget.dart
@@ -52,6 +52,8 @@ class _PveTaskExpansionTileState extends State<PveTaskExpansionTile> {
         ? (widget.headerColorExpanded ?? colorScheme.onSurface)
         : (widget.headerColor ?? colorScheme.onBackground);
 
+    final taskText = widget.showMorePage != null ? 'Last Task' : 'Task';
+
     return ExpansionTile(
       onExpansionChanged: (value) {
         setState(() {
@@ -66,7 +68,7 @@ class _PveTaskExpansionTileState extends State<PveTaskExpansionTile> {
         color: hasError ? errorColor : headerColor,
       ),
       title: Text(
-        'Last Task: ${widget.task.type}',
+        '$taskText: ${widget.task.type}',
         style: TextStyle(color: headerColor),
       ),
       subtitle: isFinished
-- 
2.39.2





More information about the pve-devel mailing list