feat(ui): add colored dot brush to ListItemViewModel
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using System;
|
||||
using Avalonia.Media;
|
||||
using ClaudeDo.Data.Models;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
@@ -9,6 +11,17 @@ public partial class ListItemViewModel : ViewModelBase
|
||||
[ObservableProperty] private string? _workingDir;
|
||||
[ObservableProperty] private string _defaultCommitType;
|
||||
|
||||
private static readonly IBrush[] DotPalette =
|
||||
[
|
||||
new SolidColorBrush(Color.Parse("#3d9474")), // green
|
||||
new SolidColorBrush(Color.Parse("#5571a1")), // blue
|
||||
new SolidColorBrush(Color.Parse("#d4964a")), // amber
|
||||
new SolidColorBrush(Color.Parse("#7c6aad")), // purple
|
||||
new SolidColorBrush(Color.Parse("#c25d6a")), // rose
|
||||
];
|
||||
|
||||
public IBrush DotBrush => DotPalette[Math.Abs(Id.GetHashCode()) % DotPalette.Length];
|
||||
|
||||
public string Id { get; }
|
||||
|
||||
public ListItemViewModel(ListEntity entity)
|
||||
|
||||
Reference in New Issue
Block a user