using NSExt.Extensions; using Spectre.Console.Rendering; namespace Dot.Git; public class TaskStatusColumn : ProgressColumn { public enum Statues : byte { [Description($"[gray]{nameof(Ready)}[/]")] Ready , [Description($"[yellow]{nameof(Executing)}[/]")] Executing , [Description($"[green]{nameof(Succeed)}[/]")] Succeed , [Description($"[red]{nameof(Failed)}[/]")] Failed } /// /// Gets or sets the alignment of the task description. /// public Justify Alignment { get; set; } = Justify.Right; /// public override IRenderable Render(RenderOptions options, ProgressTask task, TimeSpan deltaTime) { var text = task.State.Get(nameof(TaskStatusColumn)); return new Markup(text.Desc()).Overflow(Overflow.Ellipsis).Justify(Alignment); } }