mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-08 16:44:28 +01:00
Add invoice event severity
closes #1681 https://i.imgur.com/eyMO9M3.png
This commit is contained in:
@@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user