mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
feat: add gpg format switcher
This commit is contained in:
parent
b2996acb7b
commit
80dfa059ce
7 changed files with 154 additions and 27 deletions
25
src/Models/GPGFormat.cs
Normal file
25
src/Models/GPGFormat.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue