feat(sprint-3): apply Survey Teal field UI
This commit is contained in:
@@ -12,13 +12,28 @@ public sealed partial class JobListItem : ObservableObject
|
||||
public required Job Job { get; init; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(JobSummary))]
|
||||
[NotifyPropertyChangedFor(nameof(DeleteDescription))]
|
||||
[NotifyPropertyChangedFor(nameof(AccessibilityDescription))]
|
||||
private int _pointCount;
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(ActiveStatusLabel))]
|
||||
[NotifyPropertyChangedFor(nameof(ActiveActionLabel))]
|
||||
[NotifyPropertyChangedFor(nameof(ActiveActionDescription))]
|
||||
[NotifyPropertyChangedFor(nameof(AccessibilityDescription))]
|
||||
private bool _isActive;
|
||||
|
||||
public string Name => Job.Name;
|
||||
public string CreatedLabel => Job.CreatedUtc.ToLocalTime().ToString("g");
|
||||
public string ActiveStatusLabel => IsActive ? "ACTIVE JOB" : "NOT ACTIVE";
|
||||
public string ActiveActionLabel => IsActive ? "Active" : "Set active";
|
||||
public string JobSummary => $"Created {CreatedLabel} · {PointCount} {(PointCount == 1 ? "point" : "points")}";
|
||||
public string ActiveActionDescription => IsActive
|
||||
? $"{Name} is already the active job"
|
||||
: $"Make {Name} the active capture job";
|
||||
public string DeleteDescription => $"Delete {Name} and its {PointCount} saved points";
|
||||
public string AccessibilityDescription => $"{Name}. {ActiveStatusLabel}. {JobSummary}.";
|
||||
}
|
||||
|
||||
public sealed partial class JobsViewModel : ObservableObject
|
||||
@@ -37,6 +52,7 @@ public sealed partial class JobsViewModel : ObservableObject
|
||||
_settings = settings;
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
public async Task RefreshAsync()
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
Reference in New Issue
Block a user