Browse Source

undo settings change

pull/629/head
JT 7 months ago
parent
commit
e28a3980bf
  1. 27
      StabilityMatrix.Avalonia/ViewModels/Settings/MainSettingsViewModel.cs
  2. 11
      StabilityMatrix.Avalonia/Views/Settings/MainSettingsPage.axaml

27
StabilityMatrix.Avalonia/ViewModels/Settings/MainSettingsViewModel.cs

@ -344,33 +344,6 @@ public partial class MainSettingsViewModel : PageViewModelBase
);
}
[RelayCommand]
private void ClearPipCache()
{
var pipCacheLocation = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"pip",
"cache"
);
if (Directory.Exists(pipCacheLocation))
{
Directory.Delete(pipCacheLocation, true);
notificationService.Show(
"Pip cache cleared",
"The pip cache has been cleared.",
NotificationType.Success
);
}
else
{
notificationService.Show(
"Pip cache not found",
"The pip cache was not found.",
NotificationType.Warning
);
}
}
[RelayCommand]
private void NavigateToSubPage(Type viewModelType)
{

11
StabilityMatrix.Avalonia/Views/Settings/MainSettingsPage.axaml

@ -160,7 +160,7 @@
</Grid>
<!-- Environment Options -->
<Grid RowDefinitions="Auto, Auto, Auto, Auto">
<Grid RowDefinitions="Auto, Auto, Auto">
<TextBlock
Margin="0,0,0,8"
FontWeight="Medium"
@ -194,15 +194,6 @@
</StackPanel>
</ui:SettingsExpander.Footer>
</ui:SettingsExpander>
<ui:SettingsExpander
Grid.Row="3"
Margin="8,0"
Header="Pip Cache"
IconSource="ZipFolder">
<ui:SettingsExpander.Footer>
<Button Command="{Binding ClearPipCacheCommand}" Content="{x:Static lang:Resources.Action_Delete}" />
</ui:SettingsExpander.Footer>
</ui:SettingsExpander>
</Grid>
<sg:SpacedGrid RowDefinitions="Auto, Auto">

Loading…
Cancel
Save