launcher: step-by-step progress UI replaces single-line status

The single HostStatusText/JoinStatusText line gave no sense of where
the user was in the flow. Replaced with a step list:

- StartupStep model (INotifyPropertyChanged) tracks Title, State
  (Pending/Active/Done/Failed), Detail, optional Progress 0..1
- ItemsControl + DataTemplate in App.xaml renders each step as a
  status bullet (empty ring -> filled brand -> green check -> red X),
  with conditional detail line + restyled mini progress bar
- StartupFlow.NewHostFlow / NewJoinFlow build the canonical 5-step
  host and 2-step join lists; host flow swaps the tunnel step label
  for LocalNetwork mode
- OnHostStart / OnJoinApply advance steps via StartStep/CompleteStep/
  FailStep helpers and route progress callbacks to UpdateStepProgress
  so each download phase has its own bar
- Errors mark the active step Failed with the message inline, leaving
  the rest of the list visible so the user sees where it broke
This commit is contained in:
Alexa
2026-05-27 11:09:20 +03:00
parent 65ca509fa8
commit 3039bebc6c
4 changed files with 348 additions and 41 deletions
+17 -7
View File
@@ -219,13 +219,19 @@
Margin="10,0,0,0" Visibility="Collapsed" />
</StackPanel>
<!-- Status -->
<Border Style="{StaticResource Panel}" Margin="0,0,0,16">
<!-- Progress steps — populated when the user hits
"Start hosting". Hidden until then so the
idle Host view stays clean. -->
<Border x:Name="HostStepsPanel" Style="{StaticResource Panel}"
Margin="0,0,0,16" Visibility="Collapsed">
<StackPanel>
<TextBlock Style="{StaticResource SectionTitle}" Text="Status" />
<TextBlock Style="{StaticResource SectionTitle}" Text="Progress" />
<ItemsControl x:Name="HostStepsList"
ItemTemplate="{StaticResource StepRowTemplate}" />
<TextBlock x:Name="HostStatusText"
Foreground="{StaticResource InkSoft}"
TextWrapping="Wrap" Text="Idle." FontSize="14" />
TextWrapping="Wrap" FontSize="13"
Margin="0,4,0,0" />
</StackPanel>
</Border>
@@ -338,12 +344,16 @@
Margin="10,0,0,0" Visibility="Collapsed" />
</StackPanel>
<Border Style="{StaticResource Panel}">
<Border x:Name="JoinStepsPanel" Style="{StaticResource Panel}"
Visibility="Collapsed">
<StackPanel>
<TextBlock Style="{StaticResource SectionTitle}" Text="Status" />
<TextBlock Style="{StaticResource SectionTitle}" Text="Progress" />
<ItemsControl x:Name="JoinStepsList"
ItemTemplate="{StaticResource StepRowTemplate}" />
<TextBlock x:Name="JoinStatusText"
Foreground="{StaticResource InkSoft}"
TextWrapping="Wrap" Text="Idle." FontSize="14" />
TextWrapping="Wrap" FontSize="13"
Margin="0,4,0,0" />
</StackPanel>
</Border>
</StackPanel>