Adds Open Folder Button
MODIFY
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletView.xaml
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletView.xaml
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:controls="clr-namespace:WalletWasabi.Gui.Controls;assembly=WalletWasabi.Gui">
+
<DockPanel>
<controls:GroupBox Title="{Binding Title}" TextBlock.FontSize="30" Padding="20" BorderThickness="0" DockPanel.Dock="Top">
<Grid Classes="content">
<TextBlock Text="{Binding LoadButtonText}" />
</StackPanel>
</Button>
+ <Button Command="{Binding OpenFolderCommand}" DockPanel.Dock="Right" Margin="0 0 10 0">
+ <StackPanel Orientation="Horizontal" Gap="8" >
+ <DrawingPresenter Width="28" >
+ <DrawingPresenter.Drawing>
+ <GeometryDrawing Brush="#FFF6F6F6" Geometry="F1 M 19,50L 28,34L 63,34L 54,50L 19,50 Z M 19,28.0001L 35,28C 36,25 37.4999,24.0001 37.4999,24.0001L 48.75,24C 49.3023,24 50,24.6977 50,25.25L 50,28L 53.9999,28.0001L 53.9999,32L 27,32L 19,46.4L 19,28.0001 Z "/>
+ </DrawingPresenter.Drawing>
+ </DrawingPresenter>
+ <TextBlock Text="Open Wallets Folder" />
+ </StackPanel>
+ </Button>
<Grid></Grid>
</DockPanel>
<TextBlock Text="{Binding WarningMessage}" Classes="warningMessage" />

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
@@ -12,6 +12,9 @@ using WalletWasabi.Logging;
using WalletWasabi.Services;
using System.Threading.Tasks;
using WalletWasabi.Gui.Controls.WalletExplorer;
+using Avalonia.Controls;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
namespace WalletWasabi.Gui.Tabs.WalletManager
{
@@ -45,6 +48,7 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
: string.Empty);
LoadCommand = ReactiveCommand.Create(LoadWalletAsync, this.WhenAnyValue(x => x.CanLoadWallet));
+ OpenFolderCommand = ReactiveCommand.Create(OpenWalletsFolderAsync);
SetLoadButtonText(IsBusy);
}
@@ -180,5 +184,27 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
IsBusy = false;
}
}
+
+ public ReactiveCommand OpenFolderCommand { get; }
+
+ public async Task OpenWalletsFolderAsync()
+ {
+ var path = Global.WalletsDir;
+ if (Directory.Exists(path))
+ {
+ if(RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
+ Process.Start(new ProcessStartInfo { FileName = "explorer.exe", Arguments = $"\"{path}\"" });
+ }
+ else if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ {
+ Process.Start(new ProcessStartInfo { FileName = "xdg-open", Arguments = path, CreateNoWindow = true });
+ }
+ else if(RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ {
+ Process.Start(new ProcessStartInfo { FileName = "open", Arguments = path, CreateNoWindow = true });
+ }
+ }
+ }
}
}

Adds Open Folder Button