You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
192 lines
8.4 KiB
192 lines
8.4 KiB
<UserControl
|
|
x:Class="DiscordChatExporter.Gui.Views.Dialogs.SettingsView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:converters="clr-namespace:DiscordChatExporter.Gui.Converters"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:dialogs="clr-namespace:DiscordChatExporter.Gui.ViewModels.Dialogs"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:s="https://github.com/canton7/Stylet"
|
|
Width="380"
|
|
d:DataContext="{d:DesignInstance Type=dialogs:SettingsViewModel}"
|
|
Style="{DynamicResource MaterialDesignRoot}"
|
|
mc:Ignorable="d">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Margin="16"
|
|
FontSize="19"
|
|
FontWeight="Light"
|
|
Text="Settings" />
|
|
|
|
<Border
|
|
Grid.Row="1"
|
|
Padding="0,8"
|
|
BorderBrush="{DynamicResource MaterialDesignDivider}"
|
|
BorderThickness="0,1">
|
|
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
|
<StackPanel>
|
|
<!-- Auto-updates -->
|
|
<DockPanel
|
|
Margin="16,8"
|
|
Background="Transparent"
|
|
LastChildFill="False"
|
|
ToolTip="Perform automatic updates on every launch">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Left"
|
|
Text="Auto-update" />
|
|
<ToggleButton
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Right"
|
|
IsChecked="{Binding IsAutoUpdateEnabled}" />
|
|
</DockPanel>
|
|
|
|
<!-- Dark mode -->
|
|
<DockPanel
|
|
Margin="16,8"
|
|
Background="Transparent"
|
|
LastChildFill="False"
|
|
ToolTip="Use darker colors in the UI">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Left"
|
|
Text="Dark mode" />
|
|
<ToggleButton
|
|
x:Name="DarkModeToggleButton"
|
|
VerticalAlignment="Center"
|
|
Checked="DarkModeToggleButton_OnChecked"
|
|
DockPanel.Dock="Right"
|
|
IsChecked="{Binding IsDarkModeEnabled}"
|
|
Unchecked="DarkModeToggleButton_OnUnchecked" />
|
|
</DockPanel>
|
|
|
|
<!-- Persist token -->
|
|
<DockPanel
|
|
Margin="16,8"
|
|
Background="Transparent"
|
|
LastChildFill="False"
|
|
ToolTip="Save the last used token to a file so that it can be persisted between sessions">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Left"
|
|
Text="Persist token" />
|
|
<ToggleButton
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Right"
|
|
IsChecked="{Binding IsTokenPersisted}" />
|
|
</DockPanel>
|
|
|
|
<!-- Thread inclusion mode -->
|
|
<DockPanel
|
|
Margin="16,8"
|
|
Background="Transparent"
|
|
LastChildFill="False"
|
|
ToolTip="Which types of threads to show in the channel list">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Left"
|
|
Text="Show threads" />
|
|
<ComboBox
|
|
Width="150"
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Right"
|
|
ItemsSource="{Binding AvailableThreadInclusions}"
|
|
SelectedItem="{Binding ThreadInclusionMode}" />
|
|
</DockPanel>
|
|
|
|
<!-- Locale -->
|
|
<DockPanel
|
|
Margin="16,8"
|
|
Background="Transparent"
|
|
LastChildFill="False"
|
|
ToolTip="Locale to use when formatting dates and numbers">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Left"
|
|
Text="Locale" />
|
|
<ComboBox
|
|
Width="150"
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Right"
|
|
ItemsSource="{Binding AvailableLocales}"
|
|
SelectedItem="{Binding Locale}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Converter={x:Static converters:LocaleToDisplayNameConverter.Instance}}" />
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
</DockPanel>
|
|
|
|
<!-- UTC normalization -->
|
|
<DockPanel
|
|
Margin="16,8"
|
|
Background="Transparent"
|
|
LastChildFill="False"
|
|
ToolTip="Normalize all timestamps to UTC+0">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Left"
|
|
Text="Normalize to UTC" />
|
|
<ToggleButton
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Right"
|
|
IsChecked="{Binding IsUtcNormalizationEnabled}" />
|
|
</DockPanel>
|
|
|
|
<!-- Parallel limit -->
|
|
<DockPanel
|
|
Margin="16,8"
|
|
Background="Transparent"
|
|
LastChildFill="False"
|
|
ToolTip="How many channels can be exported at the same time">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Left"
|
|
Text="Parallel limit"
|
|
TextAlignment="Right" />
|
|
<StackPanel
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Right"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="10,0"
|
|
VerticalAlignment="Center"
|
|
FontWeight="SemiBold"
|
|
Text="{Binding ParallelLimit}" />
|
|
<Slider
|
|
Width="150"
|
|
VerticalAlignment="Center"
|
|
IsSnapToTickEnabled="True"
|
|
LargeChange="1"
|
|
Maximum="10"
|
|
Minimum="1"
|
|
SmallChange="1"
|
|
Style="{DynamicResource MaterialDesignThinSlider}"
|
|
TickFrequency="1"
|
|
Value="{Binding ParallelLimit}" />
|
|
</StackPanel>
|
|
</DockPanel>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Border>
|
|
|
|
<!-- Close button -->
|
|
<Button
|
|
Grid.Row="2"
|
|
Margin="16"
|
|
HorizontalAlignment="Stretch"
|
|
Command="{s:Action Close}"
|
|
Content="CLOSE"
|
|
IsCancel="True"
|
|
IsDefault="True"
|
|
Style="{DynamicResource MaterialDesignOutlinedButton}" />
|
|
</Grid>
|
|
</UserControl> |