diff --git a/src/Everything2Everything.App/Views/MainWindow.xaml b/src/Everything2Everything.App/Views/MainWindow.xaml
index 8a68bc6..5af0fac 100644
--- a/src/Everything2Everything.App/Views/MainWindow.xaml
+++ b/src/Everything2Everything.App/Views/MainWindow.xaml
@@ -255,12 +255,21 @@
-
+
+
+
+
+
+
+
+
+
(Brush)Application.Current.FindResource("FsAccentBlue"),
};
- public void SetPending() => StateText = "queued";
+ public double ProgressValue
+ {
+ get => _progressValue;
+ private set { _progressValue = value; Raise(nameof(ProgressValue)); }
+ }
+
+ public Visibility ProgressVisibility
+ {
+ get => _progressVisibility;
+ private set { _progressVisibility = value; Raise(nameof(ProgressVisibility)); }
+ }
+
+ public void SetPending()
+ {
+ StateText = "queued";
+ ProgressValue = 0;
+ ProgressVisibility = Visibility.Collapsed;
+ Raise(nameof(StateBrush));
+ }
+
public void SetState(string s)
{
StateText = s;
Raise(nameof(StateBrush));
+
+ if (s == "queued") { ProgressValue = 0; ProgressVisibility = Visibility.Collapsed; }
+ else if (s == "done") { ProgressValue = 100; ProgressVisibility = Visibility.Visible; }
+ else if (s.EndsWith('%') && double.TryParse(s.TrimEnd('%'), out var pct))
+ {
+ ProgressValue = pct;
+ ProgressVisibility = Visibility.Visible;
+ }
}
public static QueueItem FromPath(string path)