diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml
index 5e2fd823..664f5394 100644
--- a/src/Resources/Locales/en_US.axaml
+++ b/src/Resources/Locales/en_US.axaml
@@ -132,6 +132,7 @@
SHA
Open in Browser
Description
+ SUBJECT
Enter commit subject
Repository Configure
COMMIT TEMPLATE
diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml
index f4099b67..ae04215e 100644
--- a/src/Resources/Locales/zh_CN.axaml
+++ b/src/Resources/Locales/zh_CN.axaml
@@ -136,6 +136,7 @@
提交指纹
浏览器中查看
详细描述
+ 主题
填写提交信息主题
仓库配置
提交信息模板
@@ -756,4 +757,4 @@
锁定工作树
移除工作树
解除工作树锁定
-
\ No newline at end of file
+
diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml
index 078ce4de..821c5407 100644
--- a/src/Resources/Locales/zh_TW.axaml
+++ b/src/Resources/Locales/zh_TW.axaml
@@ -136,6 +136,7 @@
提交編號
在瀏覽器中檢視
詳細描述
+ 標題
填寫提交訊息標題
存放庫設定
提交訊息範本
@@ -756,4 +757,4 @@
鎖定工作區
移除工作區
解除鎖定工作區
-
\ No newline at end of file
+
diff --git a/src/ViewModels/ConventionalCommitMessageBuilder.cs b/src/ViewModels/ConventionalCommitMessageBuilder.cs
index 731c48ae..8faabe86 100644
--- a/src/ViewModels/ConventionalCommitMessageBuilder.cs
+++ b/src/ViewModels/ConventionalCommitMessageBuilder.cs
@@ -1,4 +1,5 @@
-using System.ComponentModel.DataAnnotations;
+using System;
+using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
using System.Text;
@@ -46,9 +47,9 @@ namespace SourceGit.ViewModels
set => SetProperty(ref _closedIssue, value);
}
- public ConventionalCommitMessageBuilder(WorkingCopy wc)
+ public ConventionalCommitMessageBuilder(Action onApply)
{
- _wc = wc;
+ _onApply = onApply;
}
[UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2026:RequiresUnreferencedCode")]
@@ -98,11 +99,11 @@ namespace SourceGit.ViewModels
builder.Append(_closedIssue);
}
- _wc.CommitMessage = builder.ToString();
+ _onApply?.Invoke(builder.ToString());
return true;
}
- private WorkingCopy _wc = null;
+ private Action _onApply = null;
private Models.ConventionalCommitType _type = Models.ConventionalCommitType.Supported[0];
private string _scope = string.Empty;
private string _description = string.Empty;
diff --git a/src/Views/CommitMessageTextBox.axaml b/src/Views/CommitMessageTextBox.axaml
index 5132521f..e5d63eca 100644
--- a/src/Views/CommitMessageTextBox.axaml
+++ b/src/Views/CommitMessageTextBox.axaml
@@ -12,42 +12,22 @@
BorderThickness="1"
BorderBrush="{DynamicResource Brush.Border2}"
CornerRadius="4">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Views/CommitMessageTextBox.axaml.cs b/src/Views/CommitMessageTextBox.axaml.cs
index 0811d97d..b3abe330 100644
--- a/src/Views/CommitMessageTextBox.axaml.cs
+++ b/src/Views/CommitMessageTextBox.axaml.cs
@@ -167,6 +167,23 @@ namespace SourceGit.Views
}
}
+ private void OnOpenConventionalCommitHelper(object _, RoutedEventArgs e)
+ {
+ var dialog = new ConventionalCommitMessageBuilder()
+ {
+ DataContext = new ViewModels.ConventionalCommitMessageBuilder(text => Text = text)
+ };
+
+ App.OpenDialog(dialog);
+ e.Handled = true;
+ }
+
+ private void CopyAllText(object sender, RoutedEventArgs e)
+ {
+ App.CopyText(Text);
+ e.Handled = true;
+ }
+
private TextChangeWay _changingWay = TextChangeWay.None;
}
}
diff --git a/src/Views/WorkingCopy.axaml b/src/Views/WorkingCopy.axaml
index 41d80b04..578741aa 100644
--- a/src/Views/WorkingCopy.axaml
+++ b/src/Views/WorkingCopy.axaml
@@ -233,7 +233,7 @@
-
+
-
-
-
-
-
-
-