Replace three-button cluster with a single context-aware primary button

Button follows the user journey: 'Connect to YouTube' (not signed in)
-> 'Go Live' (connected, idle) -> 'Stop Stream' (live).
This commit is contained in:
2026-08-04 10:35:00 -07:00
parent 8ee44f571e
commit 4293ae11a4
2 changed files with 31 additions and 41 deletions
+3 -31
View File
@@ -119,38 +119,10 @@
</StackPanel>
</Border>
<!-- Stream Controls -->
<!-- Primary action: single button, adapts to state -->
<StackPanel Grid.Column="3" Orientation="Horizontal" VerticalAlignment="Center">
<!-- YouTube connection status light + button -->
<Border Background="#0f3460" CornerRadius="4" Padding="8,6" Margin="0,0,12,0"
VerticalAlignment="Center" ToolTip="YouTube connection status">
<StackPanel Orientation="Horizontal">
<Ellipse Width="10" Height="10" Margin="0,0,8,0" VerticalAlignment="Center">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Setter Property="Fill" Value="#555"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsYouTubeConnected}" Value="True">
<Setter Property="Fill" Value="#00ff00"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
<Button Content="YouTube" Style="{StaticResource YtButtonSecondary}"
Background="Transparent" Padding="0"
Command="{Binding ConnectYouTubeCommand}"
ToolTip="Sign in to YouTube (optional)"/>
</StackPanel>
</Border>
<Button Content="Go Live" Style="{StaticResource YtButton}"
Command="{Binding StartStreamCommand}"
Visibility="{Binding IsOffline, Converter={StaticResource BoolToVis}}"/>
<Button Content="Stop Stream" Style="{StaticResource YtButton}"
Background="#333" Command="{Binding StopStreamCommand}"
Visibility="{Binding IsLive, Converter={StaticResource BoolToVis}}"/>
<Button Content="{Binding PrimaryButtonText}" Style="{StaticResource YtButton}"
Command="{Binding PrimaryCommand}"/>
</StackPanel>
</Grid>
</Border>