diff --git a/src/ClaudeDo.Ui/ViewModels/TaskItemViewModel.cs b/src/ClaudeDo.Ui/ViewModels/TaskItemViewModel.cs index af7ad09..5dade3c 100644 --- a/src/ClaudeDo.Ui/ViewModels/TaskItemViewModel.cs +++ b/src/ClaudeDo.Ui/ViewModels/TaskItemViewModel.cs @@ -1,3 +1,4 @@ +using Avalonia.Media; using ClaudeDo.Data.Models; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; @@ -43,6 +44,16 @@ public partial class TaskItemViewModel : ViewModelBase public bool IsRunning => Status == TaskStatus.Running; public bool CanToggleDone => Status != TaskStatus.Running && Status != TaskStatus.Failed; + public TextDecorationCollection? TitleDecorations => IsDone + ? TextDecorations.Strikethrough + : null; + + public IBrush TitleForeground => IsDone + ? new SolidColorBrush(Color.Parse("#5a6578")) + : new SolidColorBrush(Color.Parse("#e2e8f0")); + + public double RowOpacity => IsDone ? 0.6 : 1.0; + public void Refresh(TaskEntity entity, IReadOnlyList tags) { Entity = entity; @@ -56,6 +67,9 @@ public partial class TaskItemViewModel : ViewModelBase OnPropertyChanged(nameof(IsDone)); OnPropertyChanged(nameof(IsRunning)); OnPropertyChanged(nameof(CanToggleDone)); + OnPropertyChanged(nameof(TitleDecorations)); + OnPropertyChanged(nameof(TitleForeground)); + OnPropertyChanged(nameof(RowOpacity)); ToggleDoneCommand.NotifyCanExecuteChanged(); } diff --git a/src/ClaudeDo.Ui/Views/TaskListView.axaml b/src/ClaudeDo.Ui/Views/TaskListView.axaml index 81a5f55..95d788b 100644 --- a/src/ClaudeDo.Ui/Views/TaskListView.axaml +++ b/src/ClaudeDo.Ui/Views/TaskListView.axaml @@ -33,6 +33,7 @@ @@ -75,7 +76,8 @@