feat(sprint-3): apply Survey Teal field UI
This commit is contained in:
@@ -40,6 +40,16 @@ public sealed partial class HomeViewModel : ObservableObject
|
||||
[ObservableProperty]
|
||||
private string _syncStatus = "";
|
||||
|
||||
public bool HasNoActiveJob => !HasActiveJob;
|
||||
|
||||
public string ActiveJobPointSummary => PointCount == 1
|
||||
? "1 point saved locally"
|
||||
: $"{PointCount} points saved locally";
|
||||
|
||||
public string CaptureReadinessText => HasActiveJob
|
||||
? "READY · Press LOG on the locating receiver"
|
||||
: "BLOCKED · Choose or create an active job first";
|
||||
|
||||
public ObservableCollection<LoggedPoint> RecentPoints { get; } = new();
|
||||
|
||||
public HomeViewModel(DeviceConnectionManager manager, MaglinkService gps,
|
||||
@@ -149,6 +159,15 @@ public sealed partial class HomeViewModel : ObservableObject
|
||||
PointCount++;
|
||||
}
|
||||
|
||||
partial void OnHasActiveJobChanged(bool value)
|
||||
{
|
||||
OnPropertyChanged(nameof(HasNoActiveJob));
|
||||
OnPropertyChanged(nameof(CaptureReadinessText));
|
||||
}
|
||||
|
||||
partial void OnPointCountChanged(int value) =>
|
||||
OnPropertyChanged(nameof(ActiveJobPointSummary));
|
||||
|
||||
private async void OnPacketIgnoredNoJob(object? sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.DisplayAlert("No Active Job",
|
||||
|
||||
Reference in New Issue
Block a user