mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-30 13:51:53 +08:00
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.
This commit is contained in:
@@ -45,7 +45,9 @@
|
||||
<StackPanel Grid.Column="1" Orientation="Vertical" VerticalAlignment="Center">
|
||||
<StackPanel Height="40" Orientation="Horizontal">
|
||||
<TextBlock Classes="bold" Text="SourceGit" FontSize="32" />
|
||||
<Border Margin="12,0,0,0" Height="20" CornerRadius="10" Background="{DynamicResource Brush.Accent}" Effect="drop-shadow(0 0 6 #40000000)">
|
||||
<Border Margin="12,0,0,0" Height="20" CornerRadius="10" Background="{DynamicResource Brush.Accent}" Effect="drop-shadow(0 0 6 #40000000)"
|
||||
Cursor="Hand"
|
||||
PointerPressed="OnVisitGithubRelease">
|
||||
<TextBlock x:Name="TxtVersion" Classes="primary" Margin="8,0" FontSize="12" Foreground="White"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
@@ -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/");
|
||||
|
||||
Reference in New Issue
Block a user