enhance: new confirm empty commit dialog (#1143)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-04-08 20:00:42 +08:00
parent 898a8bc69a
commit 506af95963
No known key found for this signature in database
14 changed files with 144 additions and 14 deletions

View 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;
}
}