Update settings pane

This commit is contained in:
Royce551 2022-07-09 17:24:16 -05:00
parent fb038f46bb
commit 6f87c863eb
4 changed files with 60 additions and 75 deletions

3
.gitignore vendored
View file

@ -352,4 +352,5 @@ MigrationBackup/
# FMP WPF release files # FMP WPF release files
FRESHMusicPlayer/FRESHMusicPlayer-WPF/Releases FRESHMusicPlayer/FRESHMusicPlayer-WPF/Releases
FRESHMusicPlayer/FRESHMusicPlayer-WPF/ReleasesBackup FRESHMusicPlayer/FRESHMusicPlayer-WPF/ReleasesBackup
FRESHMusicPlayer/FRESHMusicPlayer-WPF/BlueprintReleases FRESHMusicPlayer/FRESHMusicPlayer-WPF/BlueprintReleases
/FRESHMusicPlayer/log.txt

View file

@ -58,7 +58,7 @@ namespace FRESHMusicPlayer.ViewModels
{ {
var stringBuilder = new StringBuilder(); var stringBuilder = new StringBuilder();
stringBuilder.AppendLine(Properties.Resources.Settings_AutoImport_Info); stringBuilder.AppendLine(Properties.Resources.Settings_AutoImport_Info);
if (Config.AutoImportPaths is not null) if (Config is not null)
{ {
foreach (var path in Config.AutoImportPaths) foreach (var path in Config.AutoImportPaths)
stringBuilder.AppendLine(path); stringBuilder.AppendLine(path);

View file

@ -206,14 +206,11 @@
</DockPanel> </DockPanel>
<ContentControl x:Name="AuxPane" DockPanel.Dock="{Binding AuxPaneDock}" Background="{DynamicResource SecondaryColor}" Content="{Binding AuxPaneContent}" Width="300" Margin="0, 0, -300, 0"> <ContentControl x:Name="AuxPane" DockPanel.Dock="{Binding AuxPaneDock}" Background="{DynamicResource SecondaryColor}" Content="{Binding AuxPaneContent}" Width="350" Margin="0, 0, -350, 0">
<ContentControl.Styles> <ContentControl.Styles>
<Style Selector="ContentControl.opened"> <Style Selector="ContentControl.opened">
<Style.Animations> <Style.Animations>
<Animation Duration="0:0:0.1" FillMode="Forward" Easing="ExponentialEaseOut"> <Animation Duration="0:0:0.1" FillMode="Forward" Easing="ExponentialEaseOut">
<!--<KeyFrame Cue="0%">
<Setter Property="Margin" Value="0, 0, -300, 0"/>
</KeyFrame>-->
<KeyFrame Cue="100%"> <KeyFrame Cue="100%">
<Setter Property="Margin" Value="0, 0, 0, 0"/> <Setter Property="Margin" Value="0, 0, 0, 0"/>
</KeyFrame> </KeyFrame>
@ -223,11 +220,8 @@
<Style Selector="ContentControl.closed"> <Style Selector="ContentControl.closed">
<Style.Animations> <Style.Animations>
<Animation Duration="0:0:0.1" FillMode="Forward" Easing="ExponentialEaseIn"> <Animation Duration="0:0:0.1" FillMode="Forward" Easing="ExponentialEaseIn">
<!--<KeyFrame Cue="0%">
<Setter Property="Margin" Value="0, 0, 0, 0"/>
</KeyFrame>-->
<KeyFrame Cue="100%"> <KeyFrame Cue="100%">
<Setter Property="Margin" Value="0, 0, -300, 0"/> <Setter Property="Margin" Value="0, 0, -350, 0"/>
</KeyFrame> </KeyFrame>
</Animation> </Animation>
</Style.Animations> </Style.Animations>

View file

@ -7,74 +7,64 @@
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="600" d:DesignHeight="400" d:DesignWidth="600" d:DesignHeight="400"
x:Class="FRESHMusicPlayer.Views.Settings"> x:Class="FRESHMusicPlayer.Views.Settings">
<UserControl.DataContext> <UserControl.DataContext>
<vm:SettingsViewModel/> <vm:SettingsViewModel/>
</UserControl.DataContext> </UserControl.DataContext>
<TabControl TabStripPlacement="Left" SelectedIndex="0">
<TabItem Header="{x:Static resx:Resources.Settings_General}">
<ScrollViewer>
<StackPanel Margin="10,10,0,0">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<TextBlock Text="{x:Static resx:Resources.Settings_Language}" Margin="0,0,10,0" VerticalAlignment="Center"/>
<ComboBox Items="{Binding AvailableLanguages}" SelectedItem="{Binding Language}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</StackPanel>
<CheckBox Content="{x:Static resx:Resources.Settings_PlaytimeLogging}" IsChecked="{Binding PlaytimeLogging}"/>
<CheckBox Content="{x:Static resx:Resources.Settings_ShowTimeInWindow}" IsChecked="{Binding ShowTimeInWindow}"/>
<TextBlock FontWeight="Bold" FontSize="18" Text="{x:Static resx:Resources.Settings_AutoImport}"/> <ScrollViewer>
<StackPanel Margin="20,10,20,0">
<TextBlock Text="{Binding AutoImportText}"/> <TextBlock FontWeight="Bold" FontSize="18" HorizontalAlignment="Center" Text="{x:Static resx:Resources.Settings_General}"/>
<Button Content="{x:Static resx:Resources.Settings_AddFolder}" Command="{Binding AddFolderCommand}"/> <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<Button Content="{x:Static resx:Resources.Settings_ClearAll}" Command="{Binding ClearAllCommand}"/> <TextBlock Text="{x:Static resx:Resources.Settings_Language}" Margin="0,0,10,0" VerticalAlignment="Center"/>
<ComboBox Items="{Binding AvailableLanguages}" SelectedItem="{Binding Language}">
<TextBlock FontWeight="Bold" FontSize="18" Text="{x:Static resx:Resources.Settings_Integrations}"/> <ComboBox.ItemTemplate>
<DataTemplate>
<CheckBox Content="{x:Static resx:Resources.Settings_IntegrateDiscordRPC}" IsChecked="{Binding IntegrateDiscordRPC}"/> <TextBlock Text="{Binding Name}"/>
<CheckBox Content="MPRIS" IsVisible="{Binding IsRunningOnLinux}" IsChecked="{Binding IntegrateMPRIS}"/> </DataTemplate>
<CheckBox Content="{x:Static resx:Resources.Settings_MPRISShowCoverArt}" Margin="20,0,0,0" IsChecked="{Binding MPRISShowCoverArt}" IsVisible="{Binding IsRunningOnLinux}"/> </ComboBox.ItemTemplate>
<TextBlock Text="{x:Static resx:Resources.Settings_MPRISShowCoverArt_Info}" Margin="20,0,0,0" TextWrapping="Wrap" Foreground="{DynamicResource ThemeControlLowBrush}" IsVisible="{Binding IsRunningOnLinux}"/> </ComboBox>
<TextBlock FontWeight="Bold" FontSize="18" Text="{x:Static resx:Resources.Settings_Updates}" IsVisible="{Binding IsRunningOnMac}"/>
<CheckBox Content="{x:Static resx:Resources.Settings_CheckForUpdates}" IsChecked="{Binding CheckForUpdates}" IsVisible="{Binding IsRunningOnMac}"/>
<TextBlock Text="{x:Static resx:Resources.Settings_RestartNeeded}" Foreground="{DynamicResource Green}" IsVisible="{Binding IsRestartNeeded}"/>
<Button Content="{x:Static resx:Resources.RestartNow}" Foreground="{DynamicResource Green}" Command="{Binding RestartCommand}" IsVisible="{Binding IsRestartNeeded}"/>
</StackPanel> </StackPanel>
</ScrollViewer> <CheckBox Content="{x:Static resx:Resources.Settings_PlaytimeLogging}" IsChecked="{Binding PlaytimeLogging}"/>
</TabItem> <CheckBox Content="{x:Static resx:Resources.Settings_ShowTimeInWindow}" IsChecked="{Binding ShowTimeInWindow}"/>
<!--<TabItem Header="{x:Static resx:Resources.Settings_Appearance}">
<TextBlock FontWeight="Bold" FontSize="18" Text="{x:Static resx:Resources.Settings_AutoImport}"/>
</TabItem>-->
<TabItem Header="{x:Static resx:Resources.Settings_Maintenance}"> <TextBlock Text="{Binding AutoImportText}"/>
<StackPanel> <Button Content="{x:Static resx:Resources.Settings_AddFolder}" Command="{Binding AddFolderCommand}"/>
<Button Content="{x:Static resx:Resources.Settings_Reset}" Command="{Binding ResetSettingsCommand}" Margin="0,10,0,0"/> <Button Content="{x:Static resx:Resources.Settings_ClearAll}" Command="{Binding ClearAllCommand}"/>
<Button Content="{x:Static resx:Resources.Settings_CleanLibrary}" Command="{Binding CleanLibraryCommand}"/>
<Button Content="{x:Static resx:Resources.Settings_NukeLibrary}" Foreground="{DynamicResource Green}" Command="{Binding NukeLibraryCommand}"/> <TextBlock FontWeight="Bold" FontSize="18" Text="{x:Static resx:Resources.Settings_Integrations}"/>
</StackPanel>
</TabItem> <CheckBox Content="{x:Static resx:Resources.Settings_IntegrateDiscordRPC}" IsChecked="{Binding IntegrateDiscordRPC}"/>
<TabItem Header="{x:Static resx:Resources.Menu_About}"> <CheckBox Content="MPRIS" IsVisible="{Binding IsRunningOnLinux}" IsChecked="{Binding IntegrateMPRIS}"/>
<StackPanel Margin="10" HorizontalAlignment="Stretch"> <CheckBox Content="{x:Static resx:Resources.Settings_MPRISShowCoverArt}" Margin="20,0,0,0" IsChecked="{Binding MPRISShowCoverArt}" IsVisible="{Binding IsRunningOnLinux}"/>
<Image Source="/Assets/fmplogofull.png" Stretch="UniformToFill" Width="300" HorizontalAlignment="Left" Margin="0,0,0,20"/> <TextBlock Text="{x:Static resx:Resources.Settings_MPRISShowCoverArt_Info}" Margin="20,0,0,0" TextWrapping="Wrap" Foreground="{DynamicResource ThemeControlLowBrush}" IsVisible="{Binding IsRunningOnLinux}"/>
<TextBlock Text="{Binding Version}"/>
<TextBlock Text="{x:Static resx:Resources.Settings_Credits}"/> <TextBlock FontWeight="Bold" FontSize="18" Text="{x:Static resx:Resources.Settings_Updates}" IsVisible="{Binding IsRunningOnMac}"/>
<TextBlock Text="{x:Static resx:Resources.Settings_License}" Margin="0,0,0,20"/>
<CheckBox Content="{x:Static resx:Resources.Settings_CheckForUpdates}" IsChecked="{Binding CheckForUpdates}" IsVisible="{Binding IsRunningOnMac}"/>
<TextBlock Text="{x:Static resx:Resources.Settings_ThankYou}" FontWeight="Bold" HorizontalAlignment="Center" Margin="0,0,0,20"/>
<TextBlock Text="{x:Static resx:Resources.Settings_RestartNeeded}" Foreground="{DynamicResource Green}" IsVisible="{Binding IsRestartNeeded}"/>
<Button Content="{x:Static resx:Resources.Settings_Report}" Command="{Binding ReportIssueCommand}"/> <Button Content="{x:Static resx:Resources.RestartNow}" Foreground="{DynamicResource Green}" Command="{Binding RestartCommand}" IsVisible="{Binding IsRestartNeeded}"/>
<Button Content="{x:Static resx:Resources.Settings_ViewSourceCode}" Command="{Binding ViewSourceCodeCommand}"/> <TextBlock HorizontalAlignment="Center" FontSize="18" FontWeight="Bold" Text="{x:Static resx:Resources.Settings_Maintenance}"/>
<Button Content="{x:Static resx:Resources.Settings_ViewLicense}" Command="{Binding ViewLicenseCommand}"/> <Button Content="{x:Static resx:Resources.Settings_Reset}" Command="{Binding ResetSettingsCommand}" Margin="0,10,0,0"/>
<Button Content="{x:Static resx:Resources.Settings_ViewWebsite}" Command="{Binding ViewWebsiteCommand}"/> <Button Content="{x:Static resx:Resources.Settings_CleanLibrary}" Command="{Binding CleanLibraryCommand}"/>
</StackPanel> <Button Content="{x:Static resx:Resources.Settings_NukeLibrary}" Foreground="{DynamicResource Green}" Command="{Binding NukeLibraryCommand}"/>
</TabItem> <TextBlock HorizontalAlignment="Center" FontSize="18" FontWeight="Bold" Text="{x:Static resx:Resources.Menu_About}"/>
</TabControl> <Image Source="/Assets/fmplogofull.png" Stretch="UniformToFill" Width="300" HorizontalAlignment="Left" Margin="0,0,0,20"/>
<TextBlock Text="{Binding Version}"/>
<TextBlock Text="{x:Static resx:Resources.Settings_Credits}"/>
<TextBlock Text="{x:Static resx:Resources.Settings_License}" Margin="0,0,0,20"/>
<TextBlock Text="{x:Static resx:Resources.Settings_ThankYou}" FontWeight="Bold" HorizontalAlignment="Center" Margin="0,0,0,20"/>
<Button Content="{x:Static resx:Resources.Settings_Report}" Command="{Binding ReportIssueCommand}"/>
<Button Content="{x:Static resx:Resources.Settings_ViewSourceCode}" Command="{Binding ViewSourceCodeCommand}"/>
<Button Content="{x:Static resx:Resources.Settings_ViewLicense}" Command="{Binding ViewLicenseCommand}"/>
<Button Content="{x:Static resx:Resources.Settings_ViewWebsite}" Command="{Binding ViewWebsiteCommand}"/>
</StackPanel>
</ScrollViewer>
</UserControl> </UserControl>