Update about page

This commit is contained in:
BlossomiShymae
2024-08-19 04:33:46 -05:00
parent 2c88ae44a2
commit a24a72b3b2
8 changed files with 173 additions and 27 deletions

View File

@@ -1,9 +1,26 @@
namespace Needlework.Net.ViewModels
using CommunityToolkit.Mvvm.Input;
using System.Diagnostics;
using System.Net.Http;
namespace Needlework.Net.ViewModels
{
public class AboutViewModel : PageBase
public partial class AboutViewModel : PageBase
{
public AboutViewModel() : base("About", "info-circle")
public HttpClient HttpClient { get; }
public AboutViewModel(HttpClient httpClient) : base("About", "info-circle")
{
HttpClient = httpClient;
}
[RelayCommand]
private void OpenUrl(string url)
{
var process = new Process()
{
StartInfo = new ProcessStartInfo(url) { UseShellExecute = true }
};
process.Start();
}
}
}