fix(ui): make worktree state chips readable with on-theme tints
The state badge in the worktrees overview used bright off-palette Material colors with hardcoded near-black text (via WorktreeStateColorConverter), which was hard to read. Switch to the existing chip pattern (subtle tint background + matching border + colored text): active=blue, merged=green, kept=amber, discarded=gray. Drop the now-unused WorktreeStateColorConverter.
This commit is contained in:
@@ -24,7 +24,12 @@ public sealed partial class WorktreeOverviewRowViewModel : ViewModelBase
|
||||
[ObservableProperty] private string _path = "";
|
||||
[ObservableProperty] private string _branchName = "";
|
||||
[ObservableProperty] private string _baseCommit = "";
|
||||
[ObservableProperty][NotifyPropertyChangedFor(nameof(IsActive))] private WorktreeState _state;
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(IsActive))]
|
||||
[NotifyPropertyChangedFor(nameof(IsMerged))]
|
||||
[NotifyPropertyChangedFor(nameof(IsDiscarded))]
|
||||
[NotifyPropertyChangedFor(nameof(IsKept))]
|
||||
private WorktreeState _state;
|
||||
[ObservableProperty] private string? _diffStat;
|
||||
[ObservableProperty][NotifyPropertyChangedFor(nameof(AgeText))] private DateTime _createdAt;
|
||||
[ObservableProperty] private bool _pathExistsOnDisk;
|
||||
@@ -40,6 +45,9 @@ public sealed partial class WorktreeOverviewRowViewModel : ViewModelBase
|
||||
|
||||
public string AgeText => FormatAge(DateTime.UtcNow - CreatedAt);
|
||||
public bool IsActive => State == WorktreeState.Active;
|
||||
public bool IsMerged => State == WorktreeState.Merged;
|
||||
public bool IsDiscarded => State == WorktreeState.Discarded;
|
||||
public bool IsKept => State == WorktreeState.Kept;
|
||||
public bool IsRunning => TaskStatus == TaskStatus.Running;
|
||||
|
||||
private static string FormatAge(TimeSpan ts)
|
||||
|
||||
Reference in New Issue
Block a user