diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml
index 67f42eb2..ae155fc8 100644
--- a/src/Resources/Locales/en_US.axaml
+++ b/src/Resources/Locales/en_US.axaml
@@ -124,6 +124,7 @@
PARENTS
REFS
SHA
+ Open in Browser
Enter commit subject
Description
Repository Configure
diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml
index 2fcb2bde..0c3e22d8 100644
--- a/src/Resources/Locales/zh_CN.axaml
+++ b/src/Resources/Locales/zh_CN.axaml
@@ -127,6 +127,7 @@
父提交
相关引用
提交指纹
+ 浏览器中查看
填写提交信息主题
详细描述
仓库配置
diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml
index aad55faf..1d58104c 100644
--- a/src/Resources/Locales/zh_TW.axaml
+++ b/src/Resources/Locales/zh_TW.axaml
@@ -127,6 +127,7 @@
前次提交
相關參照
提交編號
+ 在瀏覽器中訪問
填寫提交訊息標題
詳細描述
存放庫設定
diff --git a/src/Views/CommitBaseInfo.axaml b/src/Views/CommitBaseInfo.axaml
index 8c2bf3cf..dd39f4ef 100644
--- a/src/Views/CommitBaseInfo.axaml
+++ b/src/Views/CommitBaseInfo.axaml
@@ -55,20 +55,23 @@
-
+
-
+
+
+
+
diff --git a/src/Views/CommitBaseInfo.axaml.cs b/src/Views/CommitBaseInfo.axaml.cs
index 9806860d..ad137147 100644
--- a/src/Views/CommitBaseInfo.axaml.cs
+++ b/src/Views/CommitBaseInfo.axaml.cs
@@ -49,6 +49,14 @@ namespace SourceGit.Views
InitializeComponent();
}
+ private void OnCopyCommitSHA(object sender, RoutedEventArgs e)
+ {
+ if (sender is Button { DataContext: Models.Commit commit })
+ App.CopyText(commit.SHA);
+
+ e.Handled = true;
+ }
+
private void OnOpenWebLink(object sender, RoutedEventArgs e)
{
if (DataContext is ViewModels.CommitDetail detail)
diff --git a/src/Views/CommitMessagePresenter.cs b/src/Views/CommitMessagePresenter.cs
index a24289a5..46b53778 100644
--- a/src/Views/CommitMessagePresenter.cs
+++ b/src/Views/CommitMessagePresenter.cs
@@ -83,14 +83,13 @@ namespace SourceGit.Views
if (matches.Count == 0)
{
Inlines.Add(new Run(message));
- InvalidateTextLayout();
return;
}
matches.Sort((l, r) => l.Start - r.Start);
_matches = matches;
- var inlines = new List();
+ var inlines = new List();
var pos = 0;
foreach (var match in matches)
{
@@ -108,7 +107,6 @@ namespace SourceGit.Views
inlines.Add(new Run(message.Substring(pos)));
Inlines.AddRange(inlines);
- InvalidateTextLayout();
}
}
diff --git a/src/Views/Histories.axaml.cs b/src/Views/Histories.axaml.cs
index f3431a61..49f04726 100644
--- a/src/Views/Histories.axaml.cs
+++ b/src/Views/Histories.axaml.cs
@@ -207,14 +207,13 @@ namespace SourceGit.Views
if (matches.Count == 0)
{
Inlines.Add(new Run(subject));
- InvalidateTextLayout();
return;
}
matches.Sort((l, r) => l.Start - r.Start);
_matches = matches;
- var inlines = new List();
+ var inlines = new List();
var pos = 0;
foreach (var match in matches)
{
@@ -232,7 +231,6 @@ namespace SourceGit.Views
inlines.Add(new Run(subject.Substring(pos)));
Inlines.AddRange(inlines);
- InvalidateTextLayout();
}
}