f995625460
- Added AsyncImageLoader package for improved image loading. - Implemented macOS native VLC library bundling with a script to fetch and copy necessary files. - Enhanced PlayerView UI with updated colors and improved layout for better user experience. - Refactored media playback logic in PlayerView to handle buffering and errors more gracefully. - Updated Playlists and Programs views to use consistent styling and improved text colors. - Introduced a new settings layout with better organization and visual appeal.
88 lines
4.4 KiB
XML
88 lines
4.4 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
x:Class="TV_Player.AvaloniaApp.Views.SettingsView">
|
|
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
|
<StackPanel MaxWidth="700" HorizontalAlignment="Center" Margin="24" Spacing="16">
|
|
|
|
<TextBlock Foreground="#111827"
|
|
HorizontalAlignment="Center"
|
|
FontSize="20"
|
|
FontWeight="Bold"
|
|
Text="Settings" />
|
|
|
|
<!-- Add Playlist Section -->
|
|
<Border Background="#FFFFFF" BorderBrush="#E5E7EB" BorderThickness="1" CornerRadius="12" Padding="16">
|
|
<StackPanel Spacing="10">
|
|
<TextBlock Foreground="#374151" FontSize="13" FontWeight="SemiBold" Text="Add Playlist" />
|
|
<TextBlock Foreground="#6B7280" FontSize="12" Text="Playlist URL" />
|
|
<TextBox Text="{Binding PlaylistURL}" />
|
|
<TextBlock Foreground="#6B7280" FontSize="12" Text="Playlist Name" />
|
|
<TextBox Text="{Binding PlaylistName}" />
|
|
<Button Width="36" Height="36" HorizontalAlignment="Left" Classes="icon-green" Command="{Binding AddPlaylistCommand}">
|
|
<Viewbox Width="14" Height="14">
|
|
<Path Fill="White" Data="M11 5H13V11H19V13H13V19H11V13H5V11H11V5Z" />
|
|
</Viewbox>
|
|
</Button>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Playlists List -->
|
|
<Border Background="#FFFFFF" BorderBrush="#E5E7EB" BorderThickness="1" CornerRadius="12" Padding="8">
|
|
<ListBox ItemsSource="{Binding Playlists}"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
|
<ListBox.ItemContainerTheme>
|
|
<ControlTheme TargetType="ListBoxItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="Padding" Value="8,4" />
|
|
</ControlTheme>
|
|
</ListBox.ItemContainerTheme>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid HorizontalAlignment="Stretch" Height="48" ColumnDefinitions="180,*,48">
|
|
<TextBlock Foreground="#111827" VerticalAlignment="Center" FontSize="13" FontWeight="SemiBold" Text="{Binding Key}" TextTrimming="CharacterEllipsis" />
|
|
<TextBlock Grid.Column="1" Foreground="#4B5563" VerticalAlignment="Center" FontSize="12" Text="{Binding Value}" TextTrimming="CharacterEllipsis" />
|
|
<Button Grid.Column="2"
|
|
Width="32" Height="32"
|
|
VerticalAlignment="Center"
|
|
Classes="icon-red"
|
|
CommandParameter="{Binding}"
|
|
Command="{Binding DataContext.PlaylistDeleteCommand, RelativeSource={RelativeSource AncestorType=UserControl}}">
|
|
<Viewbox Width="12" Height="12">
|
|
<Path Fill="White" Data="M5 11H19V13H5Z" />
|
|
</Viewbox>
|
|
</Button>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Border>
|
|
|
|
<!-- Options -->
|
|
<Border Background="#FFFFFF" BorderBrush="#E5E7EB" BorderThickness="1" CornerRadius="12" Padding="16">
|
|
<StackPanel Spacing="10">
|
|
<TextBlock Foreground="#374151" FontSize="13" FontWeight="SemiBold" Text="Options" />
|
|
<CheckBox Foreground="#111827" FontSize="13" IsChecked="{Binding StartFullScreen}" Content="Start fullscreen" />
|
|
<CheckBox Foreground="#111827" FontSize="13" IsChecked="{Binding StartLastScreen}" Content="Remember last channel" />
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Actions -->
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Spacing="10">
|
|
<Button Width="36" Height="36" Classes="icon-neutral" Command="{Binding BackCommand}">
|
|
<Viewbox Width="14" Height="14">
|
|
<Path Fill="#374151" Data="M14.7 5.3L8 12L14.7 18.7L16.1 17.3L10.8 12L16.1 6.7Z" />
|
|
</Viewbox>
|
|
</Button>
|
|
<Button Width="36" Height="36" Classes="icon-lightgreen" Command="{Binding SaveCommand}">
|
|
<Viewbox Width="14" Height="14">
|
|
<Path Fill="White" Data="M9 16.2L4.8 12L3.4 13.4L9 19L21 7L19.6 5.6Z" />
|
|
</Viewbox>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</UserControl>
|