From 92f32942804087de03cc04b4c64c9c26071ee891 Mon Sep 17 00:00:00 2001 From: heartacker <1876302+heartacker@users.noreply.github.com> Date: Sat, 5 Jul 2025 17:10:29 +0800 Subject: [PATCH] feature: clicking version badge in `About` dialog will open `GitHub` release page (#1520) - Add clickable version badge with GitHub release link in About view. - Add GitHub version release link handler to open browser with specific release tag. --- src/Views/About.axaml | 4 +++- src/Views/About.axaml.cs | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Views/About.axaml b/src/Views/About.axaml index e6839617..596af1f5 100644 --- a/src/Views/About.axaml +++ b/src/Views/About.axaml @@ -45,7 +45,9 @@ - + diff --git a/src/Views/About.axaml.cs b/src/Views/About.axaml.cs index 5fdfd5b5..cda951f9 100644 --- a/src/Views/About.axaml.cs +++ b/src/Views/About.axaml.cs @@ -20,6 +20,12 @@ namespace SourceGit.Views TxtCopyright.Text = copyright.Copyright; } + private void OnVisitGithubRelease(object _, RoutedEventArgs e) + { + Native.OS.OpenBrowser($"https://github.com/sourcegit-scm/sourcegit/releases/tag/v{TxtVersion.Text}"); + e.Handled = true; + } + private void OnVisitWebsite(object _, RoutedEventArgs e) { Native.OS.OpenBrowser("https://sourcegit-scm.github.io/");