This commit is contained in:
Tyrrrz
2020-10-24 21:15:58 +03:00
parent 0763a99765
commit 1da80956dd
34 changed files with 299 additions and 261 deletions

View File

@@ -95,7 +95,7 @@
materialDesign:HintAssist.IsFloating="True"
DisplayDateEnd="{Binding BeforeDate, Converter={x:Static converters:DateTimeOffsetToDateTimeConverter.Instance}}"
SelectedDate="{Binding AfterDate, Converter={x:Static converters:DateTimeOffsetToDateTimeConverter.Instance}}"
ToolTip="If this is set, only messages sent after this date will be exported" />
ToolTip="Only include messages sent after this date" />
<DatePicker
Grid.Row="0"
Grid.Column="1"
@@ -104,7 +104,7 @@
materialDesign:HintAssist.IsFloating="True"
DisplayDateStart="{Binding AfterDate, Converter={x:Static converters:DateTimeOffsetToDateTimeConverter.Instance}}"
SelectedDate="{Binding BeforeDate, Converter={x:Static converters:DateTimeOffsetToDateTimeConverter.Instance}}"
ToolTip="If this is set, only messages sent before this date will be exported" />
ToolTip="Only include messages sent before this date" />
<materialDesign:TimePicker
Grid.Row="1"
Grid.Column="0"
@@ -113,7 +113,7 @@
materialDesign:HintAssist.IsFloating="True"
IsEnabled="{Binding IsAfterDateSet}"
SelectedTime="{Binding AfterTime, Converter={x:Static converters:TimeSpanToDateTimeConverter.Instance}}"
ToolTip="If this is set, only messages sent after this time will be exported" />
ToolTip="Only include messages sent after this time" />
<materialDesign:TimePicker
Grid.Row="1"
Grid.Column="1"
@@ -122,7 +122,7 @@
materialDesign:HintAssist.IsFloating="True"
IsEnabled="{Binding IsBeforeDateSet}"
SelectedTime="{Binding BeforeTime, Converter={x:Static converters:TimeSpanToDateTimeConverter.Instance}}"
ToolTip="If this is set, only messages sent before this time will be exported" />
ToolTip="Only include messages sent before this time" />
</Grid>
<!-- Partitioning -->
@@ -131,10 +131,10 @@
materialDesign:HintAssist.Hint="Messages per partition"
materialDesign:HintAssist.IsFloating="True"
Text="{Binding PartitionLimit, TargetNullValue=''}"
ToolTip="If this is set, the exported file will be split into multiple partitions, each containing no more than specified number of messages" />
ToolTip="Split output into partitions limited to this number of messages" />
<!-- Download media -->
<Grid Margin="16,16" ToolTip="If this is set, the export will include additional files such as user avatars, attached files, embedded images, etc">
<Grid Margin="16,16" ToolTip="Download referenced media content (user avatars, attached files, embedded images, etc)">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
@@ -143,7 +143,7 @@
<TextBlock
Grid.Column="0"
VerticalAlignment="Center"
Text="Download referenced media content" />
Text="Download media" />
<ToggleButton
Grid.Column="1"
HorizontalAlignment="Right"
@@ -168,9 +168,9 @@
Height="24"
Margin="12"
Cursor="Hand"
Loaded="AdvancedSectionToggleButton_OnLoaded"
IsChecked="{Binding IsAdvancedSectionDisplayedByDefault, Mode=OneTime}"
Style="{DynamicResource MaterialDesignHamburgerToggleButton}"
ToolTip="Show advanced options" />
ToolTip="Toggle advanced options" />
<Button
Grid.Column="2"

View File

@@ -1,7 +1,4 @@
using System.Windows;
using DiscordChatExporter.Gui.ViewModels.Dialogs;
namespace DiscordChatExporter.Gui.Views.Dialogs
namespace DiscordChatExporter.Gui.Views.Dialogs
{
public partial class ExportSetupView
{
@@ -9,11 +6,5 @@ namespace DiscordChatExporter.Gui.Views.Dialogs
{
InitializeComponent();
}
private void AdvancedSectionToggleButton_OnLoaded(object sender, RoutedEventArgs e)
{
if (DataContext is ExportSetupViewModel vm)
AdvancedSectionToggleButton.IsChecked = vm.IsAdvancedSectionDisplayedByDefault;
}
}
}

View File

@@ -65,15 +65,15 @@
IsChecked="{Binding IsTokenPersisted}" />
</DockPanel>
<!-- Reuse Media -->
<!-- Reuse media -->
<DockPanel
Background="Transparent"
LastChildFill="False"
ToolTip="If the media folder already exists, reuse media inside it to skip downloads">
ToolTip="Reuse already existing media content to skip redundant downloads">
<TextBlock
Margin="16,8"
DockPanel.Dock="Left"
Text="Reuse previously downloaded media" />
Text="Reuse downloaded media" />
<ToggleButton
Margin="16,8"
DockPanel.Dock="Right"
@@ -86,7 +86,7 @@
materialDesign:HintAssist.Hint="Date format"
materialDesign:HintAssist.IsFloating="True"
Text="{Binding DateFormat}"
ToolTip="Format used when rendering dates (uses .NET date formatting rules)" />
ToolTip="Format used when writing dates (uses .NET date formatting rules)" />
<!-- Parallel limit -->
<StackPanel Background="Transparent" ToolTip="How many channels can be exported at the same time">

View File

@@ -9,14 +9,10 @@ namespace DiscordChatExporter.Gui.Views.Dialogs
InitializeComponent();
}
private void DarkModeToggleButton_Checked(object sender, RoutedEventArgs e)
{
private void DarkModeToggleButton_Checked(object sender, RoutedEventArgs e) =>
App.SetDarkTheme();
}
private void DarkModeToggleButton_Unchecked(object sender, RoutedEventArgs e)
{
private void DarkModeToggleButton_Unchecked(object sender, RoutedEventArgs e) =>
App.SetLightTheme();
}
}
}

View File

@@ -191,10 +191,11 @@
Foreground="{DynamicResource PrimaryHueMidBrush}"
Kind="Account" />
</InlineUIContainer>
<Run Text="in the text box above." />
</TextBlock>
<TextBlock Margin="0,24,0,0" FontSize="14">
<Run Text="For more information, check out the" />
<Hyperlink NavigateUri="https://github.com/Tyrrrz/DiscordChatExporter/wiki" RequestNavigate="Hyperlink_OnRequestNavigate">wiki</Hyperlink><Run Text="." />
<Hyperlink Command="{s:Action ShowHelp}">wiki</Hyperlink><Run Text="." />
</TextBlock>
</StackPanel>
@@ -229,10 +230,11 @@
Foreground="{DynamicResource PrimaryHueMidBrush}"
Kind="Robot" />
</InlineUIContainer>
<Run Text="in the text box above." />
</TextBlock>
<TextBlock Margin="0,24,0,0" FontSize="14">
<Run Text="For more information, check out the" />
<Hyperlink NavigateUri="https://github.com/Tyrrrz/DiscordChatExporter/wiki" RequestNavigate="Hyperlink_OnRequestNavigate">wiki</Hyperlink><Run Text="." />
<Hyperlink Command="{s:Action ShowHelp}">wiki</Hyperlink><Run Text="." />
</TextBlock>
</StackPanel>
</Grid>

View File

@@ -1,7 +1,4 @@
using System.Windows.Navigation;
using DiscordChatExporter.Gui.Internal;
namespace DiscordChatExporter.Gui.Views
namespace DiscordChatExporter.Gui.Views
{
public partial class RootView
{
@@ -9,11 +6,5 @@ namespace DiscordChatExporter.Gui.Views
{
InitializeComponent();
}
private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
{
ProcessEx.StartShellExecute(e.Uri.AbsoluteUri);
e.Handled = true;
}
}
}