feat: add gpg format switcher

This commit is contained in:
Gadfly 2024-05-31 00:25:30 +08:00
parent b2996acb7b
commit 80dfa059ce
No known key found for this signature in database
7 changed files with 154 additions and 27 deletions

25
src/Models/GPGFormat.cs Normal file
View file

@ -0,0 +1,25 @@
using System.Collections.Generic;
namespace SourceGit.Models
{
public class GPGFormat(string name, string value, string desc)
{
public string Name { get; set; } = name;
public string Value { get; set; } = value;
public string Desc { get; set; } = desc;
public static readonly GPGFormat OPENPGP = new GPGFormat("OPENPGP", "openpgp", "DEFAULT");
public static readonly GPGFormat SSH = new GPGFormat("SSH", "ssh", "Git >= 2.34.0");
public static readonly List<GPGFormat> Supported = new List<GPGFormat>() {
OPENPGP,
SSH,
};
public bool Equals(GPGFormat other)
{
return Value == other.Value;
}
}
}