From 1637a85f8d9ea60f6b2751fa47eeea8e53bf1d20 Mon Sep 17 00:00:00 2001 From: Chien Zhang Date: Sun, 18 Jun 2023 00:30:32 +0800 Subject: [PATCH] v0.4.5 --- src/Polymerium.App/ViewModels/MainViewModel.cs | 16 +++++++++++++--- src/Polymerium.App/Views/InstanceView.xaml | 8 +++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/Polymerium.App/ViewModels/MainViewModel.cs b/src/Polymerium.App/ViewModels/MainViewModel.cs index 5889c342..ec670edd 100644 --- a/src/Polymerium.App/ViewModels/MainViewModel.cs +++ b/src/Polymerium.App/ViewModels/MainViewModel.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; +using System.Diagnostics; using System.Linq; using System.Windows.Input; using CommunityToolkit.Mvvm.ComponentModel; @@ -256,8 +257,17 @@ public void GotoInstanceView(string id) public void GotoSearchView(string query) { - _navigationService.Navigate( - new SearchCenterNavigationArguments(query, true) - ); + switch (query.ToLower().Trim()) + { + case "github": + Process.Start(new ProcessStartInfo("https://github.com/d3ara1n/Polymerium") + { + UseShellExecute = true + }); + break; + default: + _navigationService.Navigate(new SearchCenterNavigationArguments(query, true)); + break; + } } } diff --git a/src/Polymerium.App/Views/InstanceView.xaml b/src/Polymerium.App/Views/InstanceView.xaml index d970b997..dec3b846 100644 --- a/src/Polymerium.App/Views/InstanceView.xaml +++ b/src/Polymerium.App/Views/InstanceView.xaml @@ -130,7 +130,7 @@ - + @@ -145,7 +145,8 @@ - -