feature: supports custom actions (#638)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-01 17:23:31 +08:00
parent 7c5de7e48c
commit a36058ec51
No known key found for this signature in database
17 changed files with 478 additions and 2 deletions

View file

@ -100,6 +100,12 @@ namespace SourceGit.Models
set;
} = new AvaloniaList<IssueTrackerRule>();
public AvaloniaList<CustomAction> CustomActions
{
get;
set;
} = new AvaloniaList<CustomAction>();
public bool EnableAutoFetch
{
get;
@ -230,5 +236,22 @@ namespace SourceGit.Models
if (rule != null)
IssueTrackerRules.Remove(rule);
}
public CustomAction AddNewCustomAction()
{
var act = new CustomAction()
{
Name = "Unnamed Custom Action",
};
CustomActions.Add(act);
return act;
}
public void RemoveCustomAction(CustomAction act)
{
if (act != null)
CustomActions.Remove(act);
}
}
}