mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-02 01:34:58 +00:00
enhance: new confirm empty commit dialog (#1143)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
898a8bc69a
commit
506af95963
14 changed files with 144 additions and 14 deletions
31
src/ViewModels/ConfirmEmptyCommit.cs
Normal file
31
src/ViewModels/ConfirmEmptyCommit.cs
Normal file
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
public class ConfirmEmptyCommit
|
||||
{
|
||||
public bool HasLocalChanges
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public ConfirmEmptyCommit(bool hasLocalChanges, Action<bool> onSure)
|
||||
{
|
||||
HasLocalChanges = hasLocalChanges;
|
||||
_onSure = onSure;
|
||||
}
|
||||
|
||||
public void StageAllThenCommit()
|
||||
{
|
||||
_onSure?.Invoke(true);
|
||||
}
|
||||
|
||||
public void Continue()
|
||||
{
|
||||
_onSure?.Invoke(false);
|
||||
}
|
||||
|
||||
private Action<bool> _onSure;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue