Add invoice event severity

closes #1681
https://i.imgur.com/eyMO9M3.png
This commit is contained in:
Kukks
2020-08-28 08:49:13 +02:00
parent cf7c5102fc
commit 98c4b658c4
10 changed files with 110 additions and 51 deletions

View File

@@ -20,6 +20,7 @@ namespace BTCPayServer.Data
}
public string Message { get; set; }
public EventSeverity Severity { get; set; } = EventSeverity.Info;
internal static void OnModelCreating(ModelBuilder builder)
{
@@ -35,5 +36,25 @@ namespace BTCPayServer.Data
#pragma warning restore CS0618
});
}
public enum EventSeverity
{
Info,
Error,
Success,
Warning
}
public string GetCssClass()
{
return Severity switch
{
EventSeverity.Info => "info",
EventSeverity.Error => "danger",
EventSeverity.Success => "success",
EventSeverity.Warning => "warning",
_ => null
};
}
}
}