mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-22 20:37:19 -08:00
feature<WorkingCopy>: show waiting panel while commiting
This commit is contained in:
parent
c1b9fbaddd
commit
9641613bdb
3 changed files with 7 additions and 3 deletions
|
@ -413,6 +413,7 @@
|
|||
|
||||
<sys:String x:Key="Text.Waiting.UpdateSubmodule">WAITING SUBMOUDLE UPDATE COMPLETE...</sys:String>
|
||||
<sys:String x:Key="Text.Waiting.Staging">WAITING STAGE COMPLETE...</sys:String>
|
||||
<sys:String x:Key="Text.Waiting.Commit">WAITING COMMIT COMPLETE ...</sys:String>
|
||||
|
||||
<sys:String x:Key="Text.NotConfigured">Git has NOT been configured.\nPlease to go [Preference] and configure it first.</sys:String>
|
||||
<sys:String x:Key="Text.PathNotFound">Path[{0}] not exists!</sys:String>
|
||||
|
|
|
@ -413,6 +413,7 @@
|
|||
|
||||
<sys:String x:Key="Text.Waiting.UpdateSubmodule">等待子模块更新完成...</sys:String>
|
||||
<sys:String x:Key="Text.Waiting.Staging">等待暂存完成 ...</sys:String>
|
||||
<sys:String x:Key="Text.Waiting.Commit">等待提交完成 ...</sys:String>
|
||||
|
||||
<sys:String x:Key="Text.NotConfigured">GIT尚未配置。请打开【偏好设置】配置GIT路径。</sys:String>
|
||||
<sys:String x:Key="Text.PathNotFound">路径({0})不存在或不可读取!</sys:String>
|
||||
|
|
|
@ -914,7 +914,7 @@ namespace SourceGit.UI {
|
|||
}
|
||||
}
|
||||
|
||||
private async void Commit(object sender, RoutedEventArgs e) {
|
||||
private void Commit(object sender, RoutedEventArgs e) {
|
||||
foreach (var c in UnstagedListData) {
|
||||
if (c.IsConflit) {
|
||||
App.RaiseError("You have unsolved conflicts in your working copy!");
|
||||
|
@ -933,8 +933,10 @@ namespace SourceGit.UI {
|
|||
txtCommitMsg.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||
if (Validation.GetHasError(txtCommitMsg)) return;
|
||||
|
||||
bool succ = await Task.Run(() => Repo.DoCommit(CommitMessage, amend));
|
||||
if (succ) ClearMessage();
|
||||
Waiting.Show(Repo, "Text.Waiting.Commit", () => {
|
||||
bool succ = Repo.DoCommit(CommitMessage, amend);
|
||||
if (succ) Dispatcher.Invoke(ClearMessage);
|
||||
});
|
||||
}
|
||||
|
||||
private async void CommitAndPush(object sender, RoutedEventArgs e) {
|
||||
|
|
Loading…
Reference in a new issue