mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-12-03 02:25:40 +01:00
Avalonia and WinForms both get a Daily download limit group on the Download/Decrypt tab: scope drop-down, and when a limit is chosen a quantity spinner (minimum 1, no practical maximum) plus a Books/MB/GB unit, with the MB/GB approximation note shown only for those units. A license denial that looks like Audible throttling now suggests turning the limit on, quoting the real number of downloads Libation recorded in the last 24 hours. Audible reports no distinct throttling reason, so the suggestion stays silent unless that record makes throttling plausible. Co-authored-by: rmcrackan <rmcrackan@gmail.com>
255 lines
6.0 KiB
XML
255 lines
6.0 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"
|
|
mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="700"
|
|
xmlns:controls="clr-namespace:LibationAvalonia.Controls"
|
|
xmlns:vm="clr-namespace:LibationAvalonia.ViewModels.Settings"
|
|
x:DataType="vm:DownloadDecryptSettingsVM"
|
|
x:Class="LibationAvalonia.Controls.Settings.DownloadDecrypt">
|
|
|
|
<Grid RowDefinitions="Auto,Auto,Auto,Auto,*">
|
|
<controls:GroupBox
|
|
Grid.Row="0"
|
|
Margin="5"
|
|
Label="{Binding DailyDownloadLimitGroupboxText}">
|
|
|
|
<StackPanel Margin="0,5">
|
|
|
|
<TextBlock
|
|
Margin="0,0,0,8"
|
|
TextWrapping="Wrap"
|
|
Text="{Binding DailyDownloadLimitDescriptionText}" />
|
|
|
|
<controls:WheelComboBox
|
|
HorizontalAlignment="Left"
|
|
MinWidth="200"
|
|
ToolTip.Tip="{Binding DailyDownloadLimitTip}"
|
|
ItemsSource="{Binding DailyDownloadLimitScopes}"
|
|
SelectedItem="{Binding DailyDownloadLimit}" />
|
|
|
|
<StackPanel
|
|
Margin="0,8,0,0"
|
|
Orientation="Horizontal"
|
|
IsVisible="{Binding DailyDownloadLimitQuantityVisible}">
|
|
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="{Binding DailyDownloadLimitQuantityText}" />
|
|
|
|
<NumericUpDown
|
|
Classes="SmallNumericUpDown"
|
|
Margin="5,0,0,0"
|
|
MinWidth="140"
|
|
Minimum="1"
|
|
Maximum="2147483647"
|
|
Increment="1"
|
|
FormatString="N0"
|
|
ParsingNumberStyle="Integer"
|
|
Value="{Binding DailyDownloadLimitQuantity, Mode=TwoWay}" />
|
|
|
|
<controls:WheelComboBox
|
|
Margin="10,0,0,0"
|
|
MinWidth="90"
|
|
ItemsSource="{Binding DailyDownloadLimitUnits}"
|
|
SelectedItem="{Binding DailyDownloadLimitUnit}" />
|
|
|
|
</StackPanel>
|
|
|
|
<TextBlock
|
|
Margin="0,6,0,0"
|
|
FontStyle="Italic"
|
|
Opacity="0.8"
|
|
TextWrapping="Wrap"
|
|
IsVisible="{Binding DailyDownloadLimitApproximateNoteVisible}"
|
|
Text="{Binding DailyDownloadLimitApproximateNoteText}" />
|
|
|
|
</StackPanel>
|
|
</controls:GroupBox>
|
|
|
|
<controls:GroupBox
|
|
Grid.Row="1"
|
|
Margin="5"
|
|
Label="{Binding BadBookGroupboxText}">
|
|
|
|
<Grid
|
|
ColumnDefinitions="*,*"
|
|
RowDefinitions="Auto,Auto">
|
|
<Grid.Styles>
|
|
<Style Selector="RadioButton">
|
|
<Setter Property="Margin" Value="0,5,0,5" />
|
|
<Style Selector="^ > TextBlock">
|
|
<Setter Property="TextWrapping" Value="Wrap" />
|
|
</Style>
|
|
</Style>
|
|
</Grid.Styles>
|
|
|
|
<RadioButton
|
|
Grid.Column="0"
|
|
Grid.Row="0"
|
|
IsChecked="{Binding BadBookAsk, Mode=TwoWay}">
|
|
|
|
<TextBlock Text="{Binding BadBookAskText}" />
|
|
|
|
</RadioButton>
|
|
|
|
<RadioButton
|
|
Grid.Column="1"
|
|
Grid.Row="0"
|
|
IsChecked="{Binding BadBookAbort, Mode=TwoWay}">
|
|
|
|
<TextBlock Text="{Binding BadBookAbortText}" />
|
|
|
|
</RadioButton>
|
|
|
|
<RadioButton
|
|
Grid.Column="0"
|
|
Grid.Row="1"
|
|
IsChecked="{Binding BadBookRetry, Mode=TwoWay}">
|
|
|
|
<TextBlock Text="{Binding BadBookRetryText}" />
|
|
|
|
</RadioButton>
|
|
|
|
<RadioButton
|
|
Grid.Column="1"
|
|
Grid.Row="1"
|
|
IsChecked="{Binding BadBookIgnore, Mode=TwoWay}">
|
|
|
|
<TextBlock Text="{Binding BadBookIgnoreText}" />
|
|
|
|
</RadioButton>
|
|
</Grid>
|
|
</controls:GroupBox>
|
|
|
|
<controls:GroupBox
|
|
Margin="5"
|
|
Grid.Row="2"
|
|
Label="Custom File Naming">
|
|
|
|
<Grid
|
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto"
|
|
ColumnDefinitions="*,Auto">
|
|
|
|
<Grid.Styles>
|
|
<Style Selector="TextBox">
|
|
<Setter Property="Margin" Value="0,5,10,10" />
|
|
<Setter Property="FontSize" Value="14" />
|
|
<Setter Property="IsReadOnly" Value="True" />
|
|
</Style>
|
|
<Style Selector="Button">
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="Margin" Value="0,5,0,10" />
|
|
<Setter Property="Padding" Value="30,0" />
|
|
</Style>
|
|
</Grid.Styles>
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Margin="0,5,0,0"
|
|
Text="{Binding FolderTemplateText}" />
|
|
|
|
<TextBox
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Text="{Binding FolderTemplate}" />
|
|
|
|
<Button
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Content="Edit"
|
|
Click="EditFolderTemplateButton_Click" />
|
|
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Text="{Binding FileTemplateText}" />
|
|
|
|
<TextBox
|
|
Grid.Row="3"
|
|
Grid.Column="0"
|
|
Text="{Binding FileTemplate}" />
|
|
|
|
<Button
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
Content="Edit"
|
|
Click="EditFileTemplateButton_Click" />
|
|
|
|
<TextBlock
|
|
Grid.Row="4"
|
|
Grid.Column="0"
|
|
Text="{Binding ChapterFileTemplateText}" />
|
|
|
|
<TextBox
|
|
Grid.Row="5"
|
|
Grid.Column="0"
|
|
Text="{Binding ChapterFileTemplate}" />
|
|
|
|
<Button
|
|
Grid.Row="5"
|
|
Grid.Column="1"
|
|
Content="Edit"
|
|
Click="EditChapterFileTemplateButton_Click" />
|
|
|
|
<Button
|
|
Grid.Row="6"
|
|
Grid.Column="0"
|
|
Height="30"
|
|
Margin="0"
|
|
Content="{Binding EditCharReplacementText}"
|
|
Click="EditCharReplacementButton_Click" />
|
|
|
|
</Grid>
|
|
</controls:GroupBox>
|
|
<controls:GroupBox
|
|
Grid.Row="3"
|
|
Margin="5"
|
|
Label="Temporary Files Location">
|
|
|
|
<StackPanel
|
|
Margin="0,5" >
|
|
|
|
<TextBlock
|
|
Margin="0,0,0,10"
|
|
TextWrapping="Wrap"
|
|
Text="{Binding InProgressDescriptionText}" />
|
|
|
|
<controls:DirectoryOrCustomSelectControl
|
|
Directory="{Binding InProgressDirectory, Mode=TwoWay}"
|
|
KnownDirectories="{Binding KnownDirectories}" />
|
|
|
|
</StackPanel>
|
|
</controls:GroupBox>
|
|
|
|
<StackPanel
|
|
Grid.Row="4"
|
|
Orientation="Horizontal">
|
|
|
|
<CheckBox
|
|
Margin="5"
|
|
VerticalAlignment="Top"
|
|
IsVisible="{Binding !Config.IsLinux}"
|
|
IsChecked="{Binding UseCoverAsFolderIcon, Mode=TwoWay}">
|
|
|
|
<TextBlock
|
|
TextWrapping="Wrap"
|
|
Text="{Binding UseCoverAsFolderIconText}" />
|
|
|
|
</CheckBox>
|
|
|
|
<CheckBox
|
|
Margin="5"
|
|
VerticalAlignment="Top"
|
|
IsChecked="{Binding SaveMetadataToFile, Mode=TwoWay}">
|
|
|
|
<TextBlock
|
|
TextWrapping="Wrap"
|
|
Text="{Binding SaveMetadataToFileText}" />
|
|
|
|
</CheckBox>
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|