Delete CrashReport UI from GUI
DELETE
WalletWasabi.Gui/CrashReport/CrashReportApp.xaml
-<Application xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- x:Class="WalletWasabi.Gui.CrashReport.CrashReportApp">
- <Application.Styles>
- <StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml" />
- <StyleInclude Source="avares://AvalonStudio.Shell/Themes/BaseDark.xaml" />
- <StyleInclude Source="avares://AvalonStudio.Shell/Themes/Accents/DarkAccent.xaml" />
- <StyleInclude Source="avares://AvalonStudio.Shell/Icons/Icons.xaml" />
- <StyleInclude Source="avares://AvalonStudio.Shell/Controls/MetroWindowTheme.paml" />
- <StyleInclude Source="avares://WalletWasabi.Gui/Styles/Styles.xaml" />
- <StyleInclude Source="avares://WalletWasabi.Gui/Icons/Icons.xaml" />
- </Application.Styles>
-</Application>

DELETE
WalletWasabi.Gui/CrashReport/CrashReportApp.xaml.cs
-using Avalonia;
-using Avalonia.Controls.ApplicationLifetimes;
-using Avalonia.Markup.Xaml;
-using WalletWasabi.Gui.CrashReport.ViewModels;
-using WalletWasabi.Gui.CrashReport.Views;
-
-namespace WalletWasabi.Gui.CrashReport
-{
- public class CrashReportApp : Application
- {
- public CrashReportApp()
- {
- Name = "WasabiWallet Crash Report";
- }
-
- public override void Initialize()
- {
- AvaloniaXamlLoader.Load(this);
- }
-
- public override void OnFrameworkInitializationCompleted()
- {
- if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
- {
- desktop.MainWindow = new CrashReportWindow()
- {
- DataContext = new CrashReportWindowViewModel()
- };
- }
-
- base.OnFrameworkInitializationCompleted();
- }
- }
-}

DELETE
WalletWasabi.Gui/CrashReport/ViewModels/CrashReportWindowViewModel.cs
-using ReactiveUI;
-using Splat;
-using System;
-using System.Reactive;
-using System.Reactive.Linq;
-using WalletWasabi.CrashReport;
-using WalletWasabi.Gui.Helpers;
-using WalletWasabi.Gui.ViewModels;
-using WalletWasabi.Logging;
-
-namespace WalletWasabi.Gui.CrashReport.ViewModels
-{
- public class CrashReportWindowViewModel : ViewModelBase
- {
- public CrashReportWindowViewModel()
- {
- CrashReporter = Locator.Current.GetService<CrashReporter>();
-
- OpenLogCommand = ReactiveCommand.CreateFromTask(async () => await FileHelpers.OpenFileInTextEditorAsync(Logger.FilePath));
-
- OkCommand = ReactiveCommand.Create(() =>
- {
- // This command is bound in xaml to close the window.
- });
-
- Observable
- .Merge(OpenLogCommand.ThrownExceptions)
- .Merge(OkCommand.ThrownExceptions)
- .ObserveOn(RxApp.TaskpoolScheduler)
- .Subscribe(ex => Logger.LogError(ex));
- }
-
- private CrashReporter CrashReporter { get; }
- public int MinWidth => 520;
- public int MinHeight => 360;
- public string Title => "Wasabi Wallet - Crash Reporting";
- public string ReportTitle => "Wasabi has crashed";
- public string Details => $"Unfortunately, Wasabi has crashed. For more information, please open the log file. You may report this crash to the support team.{Environment.NewLine}{Environment.NewLine}Please always consider your privacy before sharing any information!{Environment.NewLine}{Environment.NewLine}Exception information:";
- public string? Message => CrashReporter?.SerializedException?.Message;
-
- public ReactiveCommand<Unit, Unit> OpenLogCommand { get; }
- public ReactiveCommand<Unit, Unit> OkCommand { get; }
- }
-}

DELETE
WalletWasabi.Gui/CrashReport/Views/CrashReportWindow.xaml
-<cont:WasabiWindow xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:cont="clr-namespace:AvalonStudio.Shell.Controls;assembly=AvalonStudio.Shell"
- xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
- xmlns:wasabi="clr-namespace:WalletWasabi.Gui.Controls;assembly=WalletWasabi.Gui"
- xmlns:behaviors="clr-namespace:WalletWasabi.Gui.Behaviors;assembly=WalletWasabi.Gui"
- x:Class="WalletWasabi.Gui.CrashReport.Views.CrashReportWindow"
- Icon="avares://WalletWasabi.Gui/Assets/WasabiLogo256.png"
- Title="{Binding Title}"
- MinWidth="{Binding MinWidth}" MinHeight="{Binding MinHeight}"
- Width="{Binding MinWidth, Mode=OneTime}" Height="{Binding MinHeight, Mode=OneTime}"
- FontFamily="{DynamicResource UiFont}" FontSize="14"
- Foreground="{DynamicResource ThemeForegroundBrush}"
- WindowState="{Binding WindowState}"
- Classes="ToolWindow"
- CanResize="False">
- <i:Interaction.Behaviors>
- <behaviors:CloseWindowCommandBehavior Command="{Binding OkCommand}" />
- </i:Interaction.Behaviors>
- <Panel>
- <Grid ColumnDefinitions="*,*,200" RowDefinitions="*,*,200" Opacity="0.05">
- <DrawingPresenter Grid.Column="2" Grid.Row="2" Margin="-50" Drawing="{DynamicResource WasabiLogo}" />
- </Grid>
- <Grid RowDefinitions="Auto,Auto,*,Auto" Margin="25,0,25,25">
- <TextBlock Grid.Row="0" Text="{Binding ReportTitle}" FontSize="25" FontWeight="Bold" Margin="0,0,0,12" />
- <TextBlock Grid.Row="1" Text="{Binding Details}" Margin="0,0,0,2" TextWrapping="Wrap" />
- <TextBox Grid.Row="2" Text="{Binding Message}" Classes="selectableTextBlock largeHeader" FontSize="14" FontStyle="Italic" Background="Transparent" />
- <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Spacing="5" Margin="0,8,0,0">
- <Button MinWidth="135" Height="35" Command="{Binding OpenLogCommand}">Open logs</Button>
- <Button MinWidth="135" Height="35" Background="{DynamicResource ThemeAccentBrush}" Command="{Binding OkCommand}">Ok</Button>
- </StackPanel>
- </Grid>
- </Panel>
-</cont:WasabiWindow>

DELETE
WalletWasabi.Gui/CrashReport/Views/CrashReportWindow.xaml.cs
-using Avalonia;
-using Avalonia.Markup.Xaml;
-
-namespace WalletWasabi.Gui.CrashReport.Views
-{
- public class CrashReportWindow : WasabiWindow
- {
- public CrashReportWindow()
- {
- InitializeComponent();
-#if DEBUG
- this.AttachDevTools();
-#endif
- }
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
- }
-}

MODIFY
WalletWasabi.Gui/Program.cs
WalletWasabi.Gui/Program.cs
@@ -13,7 +13,6 @@ using System.Runtime.InteropServices;
using System.Threading.Tasks;
using WalletWasabi.CrashReport;
using WalletWasabi.Gui.CommandLine;
-using WalletWasabi.Gui.CrashReport;
using WalletWasabi.Gui.ViewModels;
using WalletWasabi.Helpers;
using WalletWasabi.Logging;

Delete CrashReport UI from GUI