Crunchy-Downloader/CRD/Views/Utils/GeneralSettingsView.axaml
Elwador dc570bf420 - Added **toggle to also download description audio** for selected dubs
- Added **automatic history backups** retained for up to 5 days
- Improved **season tab** to display series more effectively
- Improved **history saving** for increased data safety
- Removed **"None" option** from the hardsub selection popup
2025-11-06 20:44:03 +01:00

686 lines
No EOL
41 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:vm="clr-namespace:CRD.ViewModels.Utils"
x:DataType="vm:GeneralSettingsViewModel"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="CRD.Views.Utils.GeneralSettingsView">
<Design.DataContext>
<vm:GeneralSettingsViewModel />
</Design.DataContext>
<ScrollViewer Padding="20 20 20 0">
<StackPanel Spacing="8">
<controls:SettingsExpander Header="History"
IconSource="Clock"
Description="Change if the download history is recorded">
<controls:SettingsExpander.Footer>
<CheckBox IsChecked="{Binding History}"> </CheckBox>
</controls:SettingsExpander.Footer>
<controls:SettingsExpanderItem Content="History Language" Description="Use the same language as Sonarr if you plan to connect it to this downloader">
<controls:SettingsExpanderItem.Footer>
<ComboBox HorizontalContentAlignment="Center" MinWidth="210" MaxDropDownHeight="400"
ItemsSource="{Binding HistoryLangList}"
SelectedItem="{Binding SelectedHistoryLang}">
</ComboBox>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="History count Missing" Description="The missing count (orange corner) shows all missing episodes, not just new ones">
<controls:SettingsExpanderItem.Footer>
<CheckBox IsChecked="{Binding HistoryCountMissing}"> </CheckBox>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="History Include CR Artists" Description="Add Crunchyroll artists (music) to the history">
<controls:SettingsExpanderItem.Footer>
<CheckBox IsChecked="{Binding HistoryIncludeCrArtists}"> </CheckBox>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="History Add Specials" Description="Add specials to the queue/count if they weren't downloaded before">
<controls:SettingsExpanderItem.Footer>
<CheckBox IsChecked="{Binding HistoryAddSpecials}"> </CheckBox>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="History Missing/New Count from Sonarr" Description="The missing count (number in the orange corner) will count the episodes missing from sonarr">
<controls:SettingsExpanderItem.Footer>
<CheckBox IsChecked="{Binding HistoryCountSonarr}"> </CheckBox>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="History Skip Sonarr Unmonitored" Description="Skips unmonitored sonarr episodes when counting Missing/New">
<controls:SettingsExpanderItem.Footer>
<CheckBox IsChecked="{Binding HistorySkipUnmonitored}"> </CheckBox>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
</controls:SettingsExpander>
<controls:SettingsExpander Header="Download Settings"
IconSource="Download"
Description="Adjust download settings"
IsExpanded="False">
<controls:SettingsExpanderItem Content="Enable New Download Method" Description="Enables the updated download handling logic. This may improve performance and stability.">
<controls:SettingsExpanderItem.Footer>
<CheckBox IsChecked="{Binding DownloadMethodeNew}"> </CheckBox>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Allow early start of next download" Description="When enabled, the next download starts as soon as the previous file has finished downloading, even if it is still being finalized (muxed/moved).">
<controls:SettingsExpanderItem.Footer>
<CheckBox IsChecked="{Binding DownloadAllowEarlyStart}"> </CheckBox>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Max Download Speed"
Description="Download in Kb/s - 0 is full speed">
<controls:SettingsExpanderItem.Footer>
<controls:NumberBox Minimum="0" Maximum="1000000000"
Value="{Binding DownloadSpeed}"
SpinButtonPlacementMode="Hidden"
HorizontalAlignment="Stretch" />
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Download Retry"
Description="Sett the number of retry attempts and the delay between each retry">
<controls:SettingsExpanderItem.Footer>
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Width="100" Text="Retry Attempts" Margin="5 0" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<controls:NumberBox Minimum="1" Maximum="10"
Value="{Binding RetryAttempts}"
SpinButtonPlacementMode="Hidden"
HorizontalAlignment="Stretch" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0 5">
<TextBlock Width="100" Text="Retry Delay (s)" Margin="5 0" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<controls:NumberBox Minimum="1" Maximum="30"
Value="{Binding RetryDelay}"
SpinButtonPlacementMode="Hidden"
HorizontalAlignment="Stretch" />
</StackPanel>
</StackPanel>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Use Temp Download Folder">
<controls:SettingsExpanderItem.Footer>
<StackPanel Orientation="Horizontal">
<TextBlock IsVisible="{Binding DownloadToTempFolder}" FontSize="15" Opacity="0.8" TextWrapping="NoWrap" Text="{Binding TempDownloadDirPath, Mode=OneWay}" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" />
<Button IsVisible="{Binding DownloadToTempFolder}" Margin="10 0 10 0" FontStyle="Italic"
VerticalAlignment="Center"
Command="{Binding OpenFolderDialogTempFolderAsync}">
<ToolTip.Tip>
<TextBlock Text="Set Temp Download Directory" FontSize="15" />
</ToolTip.Tip>
<StackPanel Orientation="Horizontal">
<controls:SymbolIcon Symbol="Folder" FontSize="18" />
</StackPanel>
</Button>
<Button IsVisible="{Binding DownloadToTempFolder}" Margin="0 0 10 0" FontStyle="Italic"
VerticalAlignment="Center"
Command="{Binding ClearDownloadTempDirPath}">
<ToolTip.Tip>
<TextBlock Text="Reset to default" FontSize="15" />
</ToolTip.Tip>
<StackPanel Orientation="Horizontal">
<controls:SymbolIcon Symbol="Clear" FontSize="18" />
</StackPanel>
</Button>
<CheckBox IsChecked="{Binding DownloadToTempFolder}"> </CheckBox>
</StackPanel>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Download Folder">
<controls:SettingsExpanderItem.Footer>
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="15" Opacity="0.8" TextWrapping="NoWrap" Text="{Binding DownloadDirPath, Mode=OneWay}" TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" />
<Button Margin="10 0 0 0" FontStyle="Italic"
VerticalAlignment="Center"
Command="{Binding OpenFolderDialogAsync}">
<ToolTip.Tip>
<TextBlock Text="Set Download Directory" FontSize="15" />
</ToolTip.Tip>
<StackPanel Orientation="Horizontal">
<controls:SymbolIcon Symbol="Folder" FontSize="18" />
</StackPanel>
</Button>
<Button Margin="10 0 0 0" FontStyle="Italic"
VerticalAlignment="Center"
Command="{Binding ClearDownloadDirPath}">
<ToolTip.Tip>
<TextBlock Text="Reset to default" FontSize="15" />
</ToolTip.Tip>
<StackPanel Orientation="Horizontal">
<controls:SymbolIcon Symbol="Clear" FontSize="18" />
</StackPanel>
</Button>
</StackPanel>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Parallel Downloads">
<controls:SettingsExpanderItem.Footer>
<controls:NumberBox Minimum="0" Maximum="10"
Value="{Binding SimultaneousDownloads}"
SpinButtonPlacementMode="Inline"
HorizontalAlignment="Stretch" />
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem IsVisible="{Binding DownloadAllowEarlyStart}" Content="Parallel Processing Jobs" Description="The maximum number of completed downloads that can be processed simultaneously (encoding, muxing, moving)">
<controls:SettingsExpanderItem.Footer>
<controls:NumberBox Minimum="0" Maximum="10"
Value="{Binding SimultaneousProcessingJobs}"
SpinButtonPlacementMode="Inline"
HorizontalAlignment="Stretch" />
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Play completion sound" Description="Enables a notification sound to be played when all downloads have finished">
<controls:SettingsExpanderItem.Footer>
<StackPanel Spacing="10">
<StackPanel Orientation="Horizontal" Spacing="10" HorizontalAlignment="Right">
<TextBlock IsVisible="{Binding DownloadFinishedPlaySound}"
Text="{Binding DownloadFinishedSoundPath, Mode=OneWay}"
FontSize="15"
Opacity="0.8"
TextWrapping="NoWrap"
TextAlignment="Center"
VerticalAlignment="Center" />
<Button IsVisible="{Binding DownloadFinishedPlaySound}"
Command="{Binding OpenImageFileDialogAsyncInternalFinishedSound}"
VerticalAlignment="Center"
FontStyle="Italic">
<ToolTip.Tip>
<TextBlock Text="Select Finished Sound" FontSize="15" />
</ToolTip.Tip>
<StackPanel Orientation="Horizontal" Spacing="5">
<controls:SymbolIcon Symbol="Folder" FontSize="18" />
</StackPanel>
</Button>
<Button IsVisible="{Binding DownloadFinishedPlaySound}"
Command="{Binding ClearFinishedSoundPath}"
VerticalAlignment="Center"
FontStyle="Italic">
<ToolTip.Tip>
<TextBlock Text="Remove Finished Sound Path" FontSize="15" />
</ToolTip.Tip>
<StackPanel Orientation="Horizontal" Spacing="5">
<controls:SymbolIcon Symbol="Clear" FontSize="18" />
</StackPanel>
</Button>
<CheckBox IsChecked="{Binding DownloadFinishedPlaySound}"> </CheckBox>
</StackPanel>
<!-- <Grid HorizontalAlignment="Right" Margin="0 5 0 0"> -->
<!-- <Grid.ColumnDefinitions> -->
<!-- <ColumnDefinition Width="Auto" /> -->
<!-- <ColumnDefinition Width="150" /> -->
<!-- </Grid.ColumnDefinitions> -->
<!-- -->
<!-- <Grid.RowDefinitions> -->
<!-- <RowDefinition Height="Auto" /> -->
<!-- <RowDefinition Height="Auto" /> -->
<!-- </Grid.RowDefinitions> -->
<!-- -->
<!-- <TextBlock Text="Opacity" -->
<!-- FontSize="15" -->
<!-- Opacity="0.8" -->
<!-- VerticalAlignment="Center" -->
<!-- HorizontalAlignment="Right" -->
<!-- Margin="0 0 5 10" -->
<!-- Grid.Row="0" Grid.Column="0" /> -->
<!-- <controls:NumberBox Minimum="0" Maximum="1" -->
<!-- SmallChange="0.05" -->
<!-- LargeChange="0.1" -->
<!-- SimpleNumberFormat="F2" -->
<!-- Value="{Binding BackgroundImageOpacity}" -->
<!-- SpinButtonPlacementMode="Inline" -->
<!-- HorizontalAlignment="Stretch" -->
<!-- Margin="0 0 0 10" -->
<!-- Grid.Row="0" Grid.Column="1" /> -->
<!-- -->
<!-- <TextBlock Text="Blur Radius" -->
<!-- FontSize="15" -->
<!-- Opacity="0.8" -->
<!-- VerticalAlignment="Center" -->
<!-- HorizontalAlignment="Right" -->
<!-- Margin="0 0 5 0" -->
<!-- Grid.Row="1" Grid.Column="0" /> -->
<!-- <controls:NumberBox Minimum="0" Maximum="40" -->
<!-- SmallChange="1" -->
<!-- LargeChange="5" -->
<!-- SimpleNumberFormat="F0" -->
<!-- Value="{Binding BackgroundImageBlurRadius}" -->
<!-- SpinButtonPlacementMode="Inline" -->
<!-- HorizontalAlignment="Stretch" -->
<!-- Grid.Row="1" Grid.Column="1" /> -->
<!-- </Grid> -->
</StackPanel>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpander.Footer>
</controls:SettingsExpander.Footer>
</controls:SettingsExpander>
<controls:SettingsExpander Header="Sonarr Settings"
IconSource="Globe"
Description="Adjust Sonarr settings"
IsEnabled="{Binding History}"
IsExpanded="False">
<controls:SettingsExpanderItem Content="Host">
<controls:SettingsExpanderItem.Footer>
<TextBox HorizontalAlignment="Left" MinWidth="250"
Text="{Binding SonarrHost}" />
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Port">
<controls:SettingsExpanderItem.Footer>
<TextBox HorizontalAlignment="Left" MinWidth="250"
Text="{Binding SonarrPort}" />
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="API Key">
<controls:SettingsExpanderItem.Footer>
<TextBox HorizontalAlignment="Left" MinWidth="250"
Text="{Binding SonarrApiKey}" />
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Use SSL">
<controls:SettingsExpanderItem.Footer>
<CheckBox IsChecked="{Binding SonarrUseSsl}"> </CheckBox>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Use Sonarr Numbering"
Description="May be incorrect if unable to match episodes">
<controls:SettingsExpanderItem.Footer>
<CheckBox IsChecked="{Binding SonarrUseSonarrNumbering}"> </CheckBox>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
</controls:SettingsExpander>
<controls:SettingsExpander Header="Proxy Settings"
IconSource="Wifi3"
Description="Changes will take effect after a restart"
IsExpanded="False">
<controls:SettingsExpanderItem Content="Use Proxy">
<controls:SettingsExpanderItem.Footer>
<CheckBox IsChecked="{Binding ProxyEnabled}"> </CheckBox>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Use Socks5 Proxy">
<controls:SettingsExpanderItem.Footer>
<CheckBox IsChecked="{Binding ProxySocks}"> </CheckBox>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Host">
<controls:SettingsExpanderItem.Footer>
<TextBox HorizontalAlignment="Left" MinWidth="250"
Text="{Binding ProxyHost}" />
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Port">
<controls:SettingsExpanderItem.Footer>
<controls:NumberBox Minimum="0" Maximum="65535"
Value="{Binding ProxyPort}"
SpinButtonPlacementMode="Inline"
HorizontalAlignment="Stretch" />
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Username">
<controls:SettingsExpanderItem.Footer>
<TextBox HorizontalAlignment="Left" MinWidth="250"
Text="{Binding ProxyUsername}" />
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Password">
<controls:SettingsExpanderItem.Footer>
<TextBox HorizontalAlignment="Left" MinWidth="250"
Text="{Binding ProxyPassword}" />
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
</controls:SettingsExpander>
<controls:SettingsExpander Header="App Appearance"
IconSource="DarkTheme"
Description="Customize the look and feel of the application"
IsExpanded="False">
<controls:SettingsExpanderItem Content="App Theme" Description="Select the theme for the application (Light, Dark, System)">
<controls:SettingsExpanderItem.Footer>
<ComboBox SelectedItem="{Binding CurrentAppTheme}"
ItemsSource="{Binding AppThemes}"
MinWidth="150" />
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="Background image">
<controls:SettingsExpanderItem.Footer>
<StackPanel Spacing="10">
<StackPanel Orientation="Horizontal" Spacing="10" HorizontalAlignment="Right">
<TextBlock Text="{Binding BackgroundImagePath, Mode=OneWay}"
FontSize="15"
Opacity="0.8"
TextWrapping="NoWrap"
TextAlignment="Center"
VerticalAlignment="Center" />
<Button Command="{Binding OpenImageFileDialogAsyncInternalBackgroundImage}"
VerticalAlignment="Center"
FontStyle="Italic">
<ToolTip.Tip>
<TextBlock Text="Select Background Image" FontSize="15" />
</ToolTip.Tip>
<StackPanel Orientation="Horizontal" Spacing="5">
<controls:SymbolIcon Symbol="Folder" FontSize="18" />
</StackPanel>
</Button>
<Button Command="{Binding ClearBackgroundImagePath}"
VerticalAlignment="Center"
FontStyle="Italic">
<ToolTip.Tip>
<TextBlock Text="Remove Background Image Path" FontSize="15" />
</ToolTip.Tip>
<StackPanel Orientation="Horizontal" Spacing="5">
<controls:SymbolIcon Symbol="Clear" FontSize="18" />
</StackPanel>
</Button>
</StackPanel>
<Grid HorizontalAlignment="Right" Margin="0 5 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Text="Opacity"
FontSize="15"
Opacity="0.8"
VerticalAlignment="Center"
HorizontalAlignment="Right"
Margin="0 0 5 10"
Grid.Row="0" Grid.Column="0" />
<controls:NumberBox Minimum="0" Maximum="1"
SmallChange="0.05"
LargeChange="0.1"
SimpleNumberFormat="F2"
Value="{Binding BackgroundImageOpacity}"
SpinButtonPlacementMode="Inline"
HorizontalAlignment="Stretch"
Margin="0 0 0 10"
Grid.Row="0" Grid.Column="1" />
<TextBlock Text="Blur Radius"
FontSize="15"
Opacity="0.8"
VerticalAlignment="Center"
HorizontalAlignment="Right"
Margin="0 0 5 0"
Grid.Row="1" Grid.Column="0" />
<controls:NumberBox Minimum="0" Maximum="40"
SmallChange="1"
LargeChange="5"
SimpleNumberFormat="F0"
Value="{Binding BackgroundImageBlurRadius}"
SpinButtonPlacementMode="Inline"
HorizontalAlignment="Stretch"
Grid.Row="1" Grid.Column="1" />
</Grid>
</StackPanel>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="App accent color preview" Description="Choose a custom accent color for the application">
<controls:SettingsExpanderItem.Footer>
<Grid RowDefinitions="*,*,*,*"
ColumnDefinitions="*,*"
HorizontalAlignment="Right"
Grid.Column="1">
<Border Background="{DynamicResource SystemAccentColor}"
Height="40" Grid.ColumnSpan="2">
<TextBlock Text="SystemAccentColor"
Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}"
HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<Border Background="{DynamicResource SystemAccentColorLight1}"
Height="40" Width="90" Grid.Column="0" Grid.Row="1">
<TextBlock Text="Light1"
Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}"
HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<Border Background="{DynamicResource SystemAccentColorLight2}"
Height="40" Width="90" Grid.Column="0" Grid.Row="2">
<TextBlock Text="Light2"
Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}"
HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<Border Background="{DynamicResource SystemAccentColorLight3}"
Height="40" Width="90" Grid.Column="0" Grid.Row="3">
<TextBlock Text="Light3"
Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}"
HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<Border Background="{DynamicResource SystemAccentColorDark1}"
Height="40" Width="90" Grid.Column="1" Grid.Row="1">
<TextBlock Text="Dark1"
Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}"
HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<Border Background="{DynamicResource SystemAccentColorDark2}"
Height="40" Width="90" Grid.Column="1" Grid.Row="2">
<TextBlock Text="Dark2"
Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}"
HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<Border Background="{DynamicResource SystemAccentColorDark3}"
Height="40" Width="90" Grid.Column="1" Grid.Row="3">
<TextBlock Text="Dark3"
Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}"
HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
</Grid>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem>
<CheckBox Content="Use Custom Accent Color?"
IsChecked="{Binding UseCustomAccent}"
HorizontalAlignment="Right" />
<controls:SettingsExpanderItem.Footer>
<StackPanel>
<TextBlock Text="Pre-set Colors"
Margin="24 24 0 0"
IsVisible="{Binding UseCustomAccent}" />
<ListBox ItemsSource="{Binding PredefinedColors}"
SelectedItem="{Binding ListBoxColor}"
MaxWidth="441"
AutoScrollToSelectedItem="False"
Margin="24 0 24 12"
HorizontalAlignment="Left"
IsVisible="{Binding UseCustomAccent}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.Styles>
<Style Selector="ListBoxItem">
<Setter Property="Width" Value="48" />
<Setter Property="Height" Value="48" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="Margin" Value="1 1 0 0" />
<Setter Property="Template">
<ControlTemplate>
<Panel>
<Border CornerRadius="{StaticResource ControlCornerRadius}"
BorderThickness="2"
Name="Root">
<Border.Background>
<SolidColorBrush Color="{Binding}" />
</Border.Background>
</Border>
<Border Name="Check"
Background="{DynamicResource FocusStrokeColorOuter}"
Width="20" Height="20"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Margin="0 2 2 0">
<controls:SymbolIcon Symbol="Checkmark"
Foreground="{DynamicResource SystemAccentColor}"
FontSize="18" />
</Border>
</Panel>
</ControlTemplate>
</Setter>
</Style>
<Style Selector="ListBoxItem /template/ Border#Check">
<Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="ListBoxItem:pointerover /template/ Border#Root">
<Setter Property="BorderBrush" Value="{DynamicResource FocusStrokeColorOuter}" />
</Style>
<Style Selector="ListBoxItem:selected /template/ Border#Root">
<Setter Property="BorderBrush" Value="{DynamicResource FocusStrokeColorOuter}" />
</Style>
<Style Selector="ListBoxItem:selected /template/ Border#Check">
<Setter Property="IsVisible" Value="True" />
</Style>
</ListBox.Styles>
</ListBox>
<Rectangle Fill="{DynamicResource ApplicationPageBackgroundThemeBrush}"
Height="1"
IsVisible="{Binding UseCustomAccent}" />
<DockPanel LastChildFill="False" Margin="24 6 0 0"
IsVisible="{Binding UseCustomAccent}">
<TextBlock Text="Custom Color"
VerticalAlignment="Center"
DockPanel.Dock="Left" />
<ColorPicker Color="{Binding CustomAccentColor}"
DockPanel.Dock="Right" />
</DockPanel>
</StackPanel>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
</controls:SettingsExpander>
<controls:SettingsExpander Header="Debug"
IconSource="Help"
Description="Tools and options for debugging and troubleshooting issues">
<controls:SettingsExpanderItem Content="Log Mode" Description="Enable error logging. Recommended only for troubleshooting issues">
<controls:SettingsExpanderItem.Footer>
<CheckBox IsChecked="{Binding LogMode}"> </CheckBox>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
<controls:SettingsExpanderItem Content="IP" Description="Check your current IP address to confirm if traffic is routed through a VPN">
<controls:SettingsExpanderItem.Footer>
<Grid VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border VerticalAlignment="Center" Height="30">
<TextBlock Text="{Binding CurrentIp}" VerticalAlignment="Center" FontSize="14" />
</Border>
<Button Grid.Column="1" Content="Check" Margin="10 0 0 0" Command="{Binding CheckIp}" />
</Grid>
</controls:SettingsExpanderItem.Footer>
</controls:SettingsExpanderItem>
</controls:SettingsExpander>
<Grid Margin="0 0 0 10"
ColumnDefinitions="*,Auto" RowDefinitions="*,Auto">
<DockPanel HorizontalAlignment="Center">
<Image Source="/Assets/app_icon.ico"
DockPanel.Dock="Left"
Height="78"
RenderOptions.BitmapInterpolationMode="HighQuality" />
<StackPanel Spacing="0" Margin="12 0">
<TextBlock Text="Crunchy-Downloader"
Theme="{StaticResource TitleTextBlockStyle}" />
<TextBlock Text="{Binding CurrentVersion}"
Theme="{StaticResource BodyTextBlockStyle}" />
<TextBlock Theme="{StaticResource CaptionTextBlockStyle}"
Text="https://github.com/Crunchy-DL/Crunchy-Downloader"
Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
</StackPanel>
</DockPanel>
</Grid>
</StackPanel>
</ScrollViewer>
</UserControl>