feat(ui): add OperationStatus feedback primitive and OperationIndicator control
Foundation for long-running-operation feedback (P0-1). OperationStatus tracks IsRunning/ShowIndicator(300ms grace)/Elapsed/IsStalled(60s since last Report) via an injectable TimeProvider, no static timer. OperationIndicator binds a status to the shared spinner style. Pre-provisions ops.* locale keys for groups A and C; no ViewModel wired up yet.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using ClaudeDo.Ui.Services;
|
||||
|
||||
namespace ClaudeDo.Ui.Views.Controls;
|
||||
|
||||
public partial class OperationIndicator : UserControl
|
||||
{
|
||||
public static readonly StyledProperty<OperationStatus?> StatusProperty =
|
||||
AvaloniaProperty.Register<OperationIndicator, OperationStatus?>(nameof(Status));
|
||||
|
||||
public OperationStatus? Status
|
||||
{
|
||||
get => GetValue(StatusProperty);
|
||||
set => SetValue(StatusProperty, value);
|
||||
}
|
||||
|
||||
public OperationIndicator() => InitializeComponent();
|
||||
|
||||
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
|
||||
{
|
||||
base.OnPropertyChanged(change);
|
||||
if (change.Property == StatusProperty)
|
||||
DataContext = change.GetNewValue<OperationStatus?>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user