mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-23 11:16:59 -04:00
Improve settings view in GUI
This commit is contained in:
parent
4599e64f0a
commit
7a9e25c1f0
1 changed files with 139 additions and 126 deletions
|
@ -10,137 +10,150 @@
|
||||||
d:DataContext="{d:DesignInstance Type=dialogs:SettingsViewModel}"
|
d:DataContext="{d:DesignInstance Type=dialogs:SettingsViewModel}"
|
||||||
Style="{DynamicResource MaterialDesignRoot}"
|
Style="{DynamicResource MaterialDesignRoot}"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
<Grid>
|
||||||
<StackPanel>
|
<Grid.RowDefinitions>
|
||||||
<TextBlock
|
<RowDefinition Height="Auto" />
|
||||||
Margin="16,16,16,8"
|
<RowDefinition Height="*" />
|
||||||
FontSize="19"
|
<RowDefinition Height="Auto" />
|
||||||
FontWeight="Light"
|
</Grid.RowDefinitions>
|
||||||
Text="Settings" />
|
|
||||||
|
|
||||||
<!-- Auto-updates -->
|
<TextBlock
|
||||||
<DockPanel
|
Grid.Row="0"
|
||||||
Margin="16,8"
|
Margin="16,16,16,8"
|
||||||
Background="Transparent"
|
FontSize="19"
|
||||||
LastChildFill="False"
|
FontWeight="Light"
|
||||||
ToolTip="Perform automatic updates on every launch">
|
Text="Settings" />
|
||||||
<TextBlock
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
DockPanel.Dock="Left"
|
|
||||||
Text="Auto-updates" />
|
|
||||||
<ToggleButton
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
DockPanel.Dock="Right"
|
|
||||||
IsChecked="{Binding IsAutoUpdateEnabled}" />
|
|
||||||
</DockPanel>
|
|
||||||
|
|
||||||
<!-- Dark mode -->
|
<ScrollViewer
|
||||||
<DockPanel
|
Grid.Row="1"
|
||||||
Margin="16,8"
|
HorizontalScrollBarVisibility="Disabled"
|
||||||
Background="Transparent"
|
VerticalScrollBarVisibility="Auto">
|
||||||
LastChildFill="False"
|
<StackPanel>
|
||||||
ToolTip="Use darker colors in the UI">
|
<!-- Auto-updates -->
|
||||||
<TextBlock
|
<DockPanel
|
||||||
VerticalAlignment="Center"
|
Margin="16,8"
|
||||||
DockPanel.Dock="Left"
|
Background="Transparent"
|
||||||
Text="Dark mode" />
|
LastChildFill="False"
|
||||||
<ToggleButton
|
ToolTip="Perform automatic updates on every launch">
|
||||||
x:Name="DarkModeToggleButton"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Checked="DarkModeToggleButton_Checked"
|
|
||||||
DockPanel.Dock="Right"
|
|
||||||
IsChecked="{Binding IsDarkModeEnabled}"
|
|
||||||
Unchecked="DarkModeToggleButton_Unchecked" />
|
|
||||||
</DockPanel>
|
|
||||||
|
|
||||||
<!-- Persist token -->
|
|
||||||
<DockPanel
|
|
||||||
Margin="16,8"
|
|
||||||
Background="Transparent"
|
|
||||||
LastChildFill="False"
|
|
||||||
ToolTip="Save last used token in a file so that it can be persisted between sessions">
|
|
||||||
<TextBlock
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
DockPanel.Dock="Left"
|
|
||||||
Text="Save token" />
|
|
||||||
<ToggleButton
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
DockPanel.Dock="Right"
|
|
||||||
IsChecked="{Binding IsTokenPersisted}" />
|
|
||||||
</DockPanel>
|
|
||||||
|
|
||||||
<!-- Reuse media -->
|
|
||||||
<DockPanel
|
|
||||||
Margin="16,8"
|
|
||||||
Background="Transparent"
|
|
||||||
LastChildFill="False"
|
|
||||||
ToolTip="Reuse already existing media content to skip redundant downloads">
|
|
||||||
<TextBlock
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
DockPanel.Dock="Left"
|
|
||||||
Text="Reuse downloaded media" />
|
|
||||||
<ToggleButton
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
DockPanel.Dock="Right"
|
|
||||||
IsChecked="{Binding ShouldReuseMedia}" />
|
|
||||||
</DockPanel>
|
|
||||||
|
|
||||||
<!-- Date format -->
|
|
||||||
<DockPanel
|
|
||||||
Margin="16,8"
|
|
||||||
Background="Transparent"
|
|
||||||
LastChildFill="False"
|
|
||||||
ToolTip="Format used when writing dates (uses .NET date formatting rules)">
|
|
||||||
<TextBlock
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
DockPanel.Dock="Left"
|
|
||||||
Text="Date format" />
|
|
||||||
<TextBox
|
|
||||||
Width="150"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
DockPanel.Dock="Right"
|
|
||||||
Text="{Binding DateFormat}" />
|
|
||||||
</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
|
<TextBlock
|
||||||
Margin="10,0"
|
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontWeight="SemiBold"
|
DockPanel.Dock="Left"
|
||||||
Text="{Binding ParallelLimit}" />
|
Text="Auto-updates" />
|
||||||
<Slider
|
<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_Checked"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
IsChecked="{Binding IsDarkModeEnabled}"
|
||||||
|
Unchecked="DarkModeToggleButton_Unchecked" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<!-- Persist token -->
|
||||||
|
<DockPanel
|
||||||
|
Margin="16,8"
|
||||||
|
Background="Transparent"
|
||||||
|
LastChildFill="False"
|
||||||
|
ToolTip="Save last used token in a file so that it can be persisted between sessions">
|
||||||
|
<TextBlock
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
DockPanel.Dock="Left"
|
||||||
|
Text="Save token" />
|
||||||
|
<ToggleButton
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
IsChecked="{Binding IsTokenPersisted}" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<!-- Reuse media -->
|
||||||
|
<DockPanel
|
||||||
|
Margin="16,8"
|
||||||
|
Background="Transparent"
|
||||||
|
LastChildFill="False"
|
||||||
|
ToolTip="Reuse already existing media content to skip redundant downloads">
|
||||||
|
<TextBlock
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
DockPanel.Dock="Left"
|
||||||
|
Text="Reuse downloaded media" />
|
||||||
|
<ToggleButton
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
DockPanel.Dock="Right"
|
||||||
|
IsChecked="{Binding ShouldReuseMedia}" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<!-- Date format -->
|
||||||
|
<DockPanel
|
||||||
|
Margin="16,8"
|
||||||
|
Background="Transparent"
|
||||||
|
LastChildFill="False"
|
||||||
|
ToolTip="Format used when writing dates (uses .NET date formatting rules)">
|
||||||
|
<TextBlock
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
DockPanel.Dock="Left"
|
||||||
|
Text="Date format" />
|
||||||
|
<TextBox
|
||||||
Width="150"
|
Width="150"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Maximum="10"
|
DockPanel.Dock="Right"
|
||||||
Minimum="1"
|
Text="{Binding DateFormat}" />
|
||||||
Style="{DynamicResource MaterialDesignThinSlider}"
|
</DockPanel>
|
||||||
Value="{Binding ParallelLimit}" />
|
|
||||||
</StackPanel>
|
|
||||||
</DockPanel>
|
|
||||||
|
|
||||||
<!-- Save button -->
|
<!-- Parallel limit -->
|
||||||
<Button
|
<DockPanel
|
||||||
Margin="16"
|
Margin="16,8"
|
||||||
HorizontalAlignment="Stretch"
|
Background="Transparent"
|
||||||
Command="{s:Action Close}"
|
LastChildFill="False"
|
||||||
Content="SAVE"
|
ToolTip="How many channels can be exported at the same time">
|
||||||
IsCancel="True"
|
<TextBlock
|
||||||
IsDefault="True"
|
VerticalAlignment="Center"
|
||||||
Style="{DynamicResource MaterialDesignOutlinedButton}" />
|
DockPanel.Dock="Left"
|
||||||
</StackPanel>
|
Text="Parallel limit"
|
||||||
</ScrollViewer>
|
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"
|
||||||
|
Maximum="10"
|
||||||
|
Minimum="1"
|
||||||
|
Style="{DynamicResource MaterialDesignThinSlider}"
|
||||||
|
Value="{Binding ParallelLimit}" />
|
||||||
|
</StackPanel>
|
||||||
|
</DockPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
|
|
||||||
|
<!-- Save button -->
|
||||||
|
<Button
|
||||||
|
Grid.Row="2"
|
||||||
|
Margin="16"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Command="{s:Action Close}"
|
||||||
|
Content="SAVE"
|
||||||
|
IsCancel="True"
|
||||||
|
IsDefault="True"
|
||||||
|
Style="{DynamicResource MaterialDesignOutlinedButton}" />
|
||||||
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
Loading…
Add table
Add a link
Reference in a new issue