Remove redundant OFFLINE/LIVE status pill; single button conveys state
This commit is contained in:
+1
-29
@@ -78,7 +78,6 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Logo / Brand -->
|
||||
@@ -92,35 +91,8 @@
|
||||
Width="400" HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"/>
|
||||
|
||||
<!-- Stream Status -->
|
||||
<Border Grid.Column="2" Background="#0f3460" CornerRadius="4"
|
||||
Padding="12,6" Margin="16,0" VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Ellipse Width="10" Height="10" Margin="0,0,8,0">
|
||||
<Ellipse.Style>
|
||||
<Style TargetType="Ellipse">
|
||||
<Setter Property="Fill" Value="#555"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding StreamStatus}" Value="Streaming">
|
||||
<Setter Property="Fill" Value="#00ff00"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding StreamStatus}" Value="Connecting">
|
||||
<Setter Property="Fill" Value="#ffaa00"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding StreamStatus}" Value="Error">
|
||||
<Setter Property="Fill" Value="#ff0000"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Ellipse.Style>
|
||||
</Ellipse>
|
||||
<TextBlock Text="{Binding StatusDisplay}" Foreground="White"
|
||||
FontSize="13" FontWeight="SemiBold" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Primary action: single button, adapts to state -->
|
||||
<StackPanel Grid.Column="3" Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<Button Content="{Binding PrimaryButtonText}" Style="{StaticResource YtButton}"
|
||||
Command="{Binding PrimaryCommand}"/>
|
||||
</StackPanel>
|
||||
|
||||
@@ -37,7 +37,6 @@ public class MainViewModel : ViewModelBase
|
||||
{
|
||||
OnPropertyChanged(nameof(IsOffline));
|
||||
OnPropertyChanged(nameof(IsLive));
|
||||
OnPropertyChanged(nameof(StatusDisplay));
|
||||
OnPropertyChanged(nameof(PrimaryButtonText));
|
||||
}
|
||||
}
|
||||
@@ -74,15 +73,6 @@ public class MainViewModel : ViewModelBase
|
||||
}
|
||||
}
|
||||
|
||||
public string StatusDisplay => StreamStatus switch
|
||||
{
|
||||
StreamStatus.Offline => "OFFLINE",
|
||||
StreamStatus.Connecting => "CONNECTING...",
|
||||
StreamStatus.Streaming => "LIVE",
|
||||
StreamStatus.Error => "ERROR",
|
||||
_ => "UNKNOWN"
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Single, context-aware primary button. Follows the user's journey:
|
||||
/// not connected → connect, connected+idle → go live, live → stop.
|
||||
|
||||
Reference in New Issue
Block a user