Add functionality to about page links
MODIFY
WalletWasabi.Gui/Tabs/AboutView.xaml
WalletWasabi.Gui/Tabs/AboutView.xaml
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Clearnet Website: " />
- <controls:ExtendedTextBox Text="https://wasabiwallet.io/" Classes="selectableTextBlock hyperLink" />
+ <Button Content="{Binding ClearnetLink}" Classes="activeHyperLink" Command="{Binding OnClearnetClicked}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Tor Website: " />
- <controls:ExtendedTextBox Text="http://wasabiukrxmkdgve5kynjztuovbg43uxcbcxn6y2okcrsg7gb6jdmbad.onion" Classes="selectableTextBlock hyperLink" />
+ <controls:ExtendedTextBox Text="{Binding TorLink}" Classes="selectableTextBlock hyperLink" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Source Code: " />
- <controls:ExtendedTextBox Text="https://github.com/zkSNACKs/WalletWasabi/" Classes="selectableTextBlock hyperLink" />
+ <Button Content="{Binding SourceCodeLink}" Classes="activeHyperLink" Command="{Binding OnSourceCodeClicked}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Customer Support: " />
- <controls:ExtendedTextBox Text="https://www.reddit.com/r/WasabiWallet/" Classes="selectableTextBlock hyperLink" />
+ <Button Content="{Binding CustomerSupportLink}" Classes="activeHyperLink" Command="{Binding OnCustomerSupportClicked}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Bug Report: " />
- <controls:ExtendedTextBox Text="https://github.com/zkSNACKs/WalletWasabi/issues/" Classes="selectableTextBlock hyperLink" />
+ <Button Content="{Binding BugReportLink}" Classes="activeHyperLink" Command="{Binding OnBugReportClicked}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="FAQ: " />
- <controls:ExtendedTextBox Text="https://github.com/zkSNACKs/WalletWasabi/blob/master/WalletWasabi.Documentation/FAQ.md" Classes="selectableTextBlock hyperLink" />
+ <Button Content="{Binding FAQLink}" Classes="activeHyperLink" Command="{Binding OnFAQClicked}" />
</StackPanel>
</StackPanel>
</Grid>

MODIFY
WalletWasabi.Gui/Tabs/AboutViewModel.cs
WalletWasabi.Gui/Tabs/AboutViewModel.cs
using Avalonia.Diagnostics.ViewModels;
using System;
+using System.Runtime.InteropServices;
+using System.Diagnostics;
using System.Collections.Generic;
using System.Text;
using WalletWasabi.Gui.ViewModels;
@@ -16,5 +18,65 @@ namespace WalletWasabi.Gui.Tabs
public Version Version { get; }
public string VersionText => $"v{Version.ToString()}";
+
+ public string ClearnetLink => "https://wasabiwallet.io/";
+
+ public string TorLink => "http://wasabiukrxmkdgve5kynjztuovbg43uxcbcxn6y2okcrsg7gb6jdmbad.onion";
+
+ public string SourceCodeLink => "https://github.com/zkSNACKs/WalletWasabi/";
+
+ public string CustomerSupportLink => "https://www.reddit.com/r/WasabiWallet/";
+
+ public string BugReportLink => "https://github.com/zkSNACKs/WalletWasabi/issues/";
+
+ public string FAQLink => "https://github.com/zkSNACKs/WalletWasabi/blob/master/WalletWasabi.Documentation/FAQ.md";
+
+ public void OnClearnetClicked()
+ {
+ OpenLink(ClearnetLink);
+ }
+
+ public void OnSourceCodeClicked()
+ {
+ OpenLink(SourceCodeLink);
+ }
+
+ public void OnCustomerSupportClicked()
+ {
+ OpenLink(CustomerSupportLink);
+ }
+
+ public void OnBugReportClicked()
+ {
+ OpenLink(BugReportLink);
+ }
+
+ public void OnFAQClicked()
+ {
+ OpenLink(FAQLink);
+ }
+
+ public void OpenLink(string url)
+ {
+ try
+ {
+ Process.Start(url);
+ }
+ catch
+ {
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
+ Process.Start(new ProcessStartInfo("cmd", $"/c start {url}") { CreateNoWindow = true });
+ }
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ {
+ Process.Start("xdg-open", url);
+ }
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ {
+ Process.Start("open", url);
+ }
+ }
+ }
}
}

Add functionality to about page links