Replaces the "About Avalonia" entry in global app menu in macOS and KDE based Linux distros with our own that triggers the About page dialog. Also make it a little bit smarter by disabling the menu item depending on context.
MODIFY
WalletWasabi.Fluent/App.axaml
WalletWasabi.Fluent/App.axaml
<StyleInclude Source="avares://WalletWasabi.Fluent/Controls/StatusItem.axaml" />
<StyleInclude Source="avares://WalletWasabi.Fluent/Controls/PrivacyContentControl.axaml" />
</Application.Styles>
-
+ <NativeMenu.Menu>
+ <NativeMenu>
+ <NativeMenuItem Header="About Wasabi Wallet" Command="{Binding AboutCommand}" />
+ </NativeMenu>
+ </NativeMenu.Menu>
<TrayIcon.Icons>
<TrayIcons>
<TrayIcon Icon="{Binding TrayIcon}" Clicked="TrayIcon_OnClicked">

MODIFY
WalletWasabi.Fluent/ViewModels/ApplicationViewModel.cs
WalletWasabi.Fluent/ViewModels/ApplicationViewModel.cs
+using System.Reactive.Linq;
using System.Runtime.InteropServices;
using System.Windows.Input;
using Avalonia;
@@ -6,6 +7,7 @@ using Avalonia.Controls.ApplicationLifetimes;
using ReactiveUI;
using WalletWasabi.Fluent.Helpers;
using WalletWasabi.Fluent.Providers;
+using WalletWasabi.Fluent.ViewModels.HelpAndSupport;
using WalletWasabi.Fluent.ViewModels.Navigation;
using WalletWasabi.WabiSabi.Client;
@@ -38,6 +40,21 @@ public class ApplicationViewModel : ViewModelBase, ICanShutdownProvider
ShowCommand = ReactiveCommand.Create(() => ShowRequested?.Invoke(this, EventArgs.Empty));
+ var dialogScreen = MainViewModel.Instance.DialogScreen;
+
+ AboutCommand = ReactiveCommand.Create(
+ () => dialogScreen.To(new AboutViewModel(navigateBack: dialogScreen.CurrentPage is not null)),
+ canExecute: dialogScreen.WhenAnyValue(x => x.CurrentPage)
+ .SelectMany(x =>
+ {
+ return x switch
+ {
+ null => Observable.Return(true),
+ AboutViewModel => Observable.Return(false),
+ _ => x.WhenAnyValue(page => page.IsBusy).Select(isBusy => !isBusy)
+ };
+ }));
+
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
using var bitmap = AssetHelpers.GetBitmapAsset("avares://WalletWasabi.Fluent/Assets/WasabiLogo_white.ico");
@@ -56,8 +73,9 @@ public class ApplicationViewModel : ViewModelBase, ICanShutdownProvider
public event EventHandler? ShowRequested;
- public ICommand QuitCommand { get; }
+ public ICommand AboutCommand { get; }
public ICommand ShowCommand { get; }
+ public ICommand QuitCommand { get; }
public bool CanShutdown()
{

MODIFY
WalletWasabi.Fluent/ViewModels/HelpAndSupport/AboutViewModel.cs
WalletWasabi.Fluent/ViewModels/HelpAndSupport/AboutViewModel.cs
@@ -24,8 +24,10 @@ namespace WalletWasabi.Fluent.ViewModels.HelpAndSupport;
NavigationTarget = NavigationTarget.DialogScreen)]
public partial class AboutViewModel : RoutableViewModel
{
- public AboutViewModel()
+ public AboutViewModel(bool navigateBack = false)
{
+ EnableBack = navigateBack;
+
Links = new List<ViewModelBase>()
{
new LinkViewModel()

MODIFY
WalletWasabi.Fluent/Views/HelpAndSupport/AboutView.axaml
WalletWasabi.Fluent/Views/HelpAndSupport/AboutView.axaml
</Style>
</UserControl.Styles>
<Panel>
- <controls:ContentArea EnableNext="True" NextContent="Close">
+ <controls:ContentArea EnableNext="{Binding !EnableBack}"
+ NextContent="Close"
+ EnableBack="{Binding EnableBack}">
<DockPanel LastChildFill="True">
<Viewbox DockPanel.Dock="Top" Margin="25,25,25,50" Width="112" VerticalAlignment="Center"
HorizontalAlignment="Center">

Replaces the "About Avalonia" entry in global app menu in macOS and KDE based Linux distros with our own that triggers the About page dialog. Also make it a little bit smarter by disabling the menu item depending on context.