Two-state flow with go-live dialog, unmissable live indicators, taskbar overlay
This commit is contained in:
+36
-15
@@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:vm="clr-namespace:ytLive.ViewModels"
|
||||
mc:Ignorable="d"
|
||||
Title="ytLive" Height="720" Width="1280"
|
||||
Title="{Binding WindowTitle}" Height="720" Width="1280"
|
||||
Background="#1a1a2e"
|
||||
WindowStartupLocation="CenterScreen">
|
||||
|
||||
@@ -13,9 +13,26 @@
|
||||
<vm:MainViewModel/>
|
||||
</Window.DataContext>
|
||||
|
||||
<Window.TaskbarItemInfo>
|
||||
<TaskbarItemInfo x:Name="TaskbarInfo"/>
|
||||
</Window.TaskbarItemInfo>
|
||||
|
||||
<Window.Resources>
|
||||
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
|
||||
|
||||
<!-- Red dot shown in the taskbar icon while live -->
|
||||
<DrawingImage x:Key="LiveOverlay">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup>
|
||||
<GeometryDrawing Brush="#e94560">
|
||||
<GeometryDrawing.Geometry>
|
||||
<EllipseGeometry Center="8,8" RadiusX="8" RadiusY="8"/>
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
|
||||
<!-- Base button style -->
|
||||
<Style x:Key="YtButton" TargetType="Button">
|
||||
<Setter Property="Background" Value="#e94560"/>
|
||||
@@ -72,7 +89,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- ═══ TOP BAR: Stream Controls ═══ -->
|
||||
<Border Grid.Row="0" Background="#16213e" Padding="16,10">
|
||||
<Border Grid.Row="0" Background="{Binding TopBarBackground}" Padding="16,10">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
@@ -85,20 +102,23 @@
|
||||
Foreground="#e94560" FontSize="22" FontWeight="Bold"
|
||||
VerticalAlignment="Center" Margin="0,0,24,0"/>
|
||||
|
||||
<!-- Stream Title -->
|
||||
<TextBox Grid.Column="1" Style="{StaticResource YtTextBox}"
|
||||
Text="{Binding StreamTitle, UpdateSourceTrigger=PropertyChanged}"
|
||||
Width="400" HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"/>
|
||||
<!-- LIVE badge (center) -->
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Visibility="{Binding LiveIndicatorVisible, Converter={StaticResource BoolToVis}}">
|
||||
<Ellipse Width="12" Height="12" Fill="White" VerticalAlignment="Center"
|
||||
Opacity="{Binding LivePulseOpacity}"/>
|
||||
<TextBlock Text="LIVE" Foreground="White" FontSize="16" FontWeight="Bold"
|
||||
VerticalAlignment="Center" Margin="8,0,0,0"/>
|
||||
<TextBlock Text="{Binding LiveElapsedText}" Foreground="White" FontSize="14"
|
||||
FontFamily="Consolas" VerticalAlignment="Center" Margin="14,0,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Primary actions: one relevant button per state -->
|
||||
<!-- Single two-state action button -->
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<Button Content="Connect" Style="{StaticResource YtButton}"
|
||||
Command="{Binding ConnectCommand}"
|
||||
Visibility="{Binding ShowConnect, Converter={StaticResource BoolToVis}}"/>
|
||||
<Button Content="Go Live" Style="{StaticResource YtButton}"
|
||||
Command="{Binding GoLiveCommand}"
|
||||
Visibility="{Binding ShowGoLive, Converter={StaticResource BoolToVis}}"/>
|
||||
<Button Content="Start Stream" Style="{StaticResource YtButton}"
|
||||
Command="{Binding StartStreamCommand}"
|
||||
Visibility="{Binding IsOffline, Converter={StaticResource BoolToVis}}"/>
|
||||
<Button Content="End Stream" Style="{StaticResource YtButton}"
|
||||
Background="#333" Command="{Binding EndStreamCommand}"
|
||||
Visibility="{Binding IsLive, Converter={StaticResource BoolToVis}}"/>
|
||||
@@ -151,7 +171,8 @@
|
||||
</Border>
|
||||
|
||||
<!-- CENTER: Preview Area -->
|
||||
<Border Grid.Column="1" Background="#0a0a1a" CornerRadius="6" Margin="8,0">
|
||||
<Border Grid.Column="1" Background="#0a0a1a" CornerRadius="6" Margin="8,0"
|
||||
BorderBrush="{Binding PreviewGlowBrush}" BorderThickness="{Binding PreviewGlowThickness}">
|
||||
<Grid>
|
||||
<TextBlock Text="Preview" Foreground="#333" FontSize="24"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
|
||||
Reference in New Issue
Block a user