mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-05 18:20:30 +01:00
38 lines
749 B
C#
38 lines
749 B
C#
|
using Newtonsoft.Json;
|
||
|
using Newtonsoft.Json.Converters;
|
||
|
|
||
|
namespace BTCPayServer.Abstractions.Form;
|
||
|
|
||
|
public class AlertMessage
|
||
|
{
|
||
|
// Corresponds to the Bootstrap CSS "alert alert-xxx" messages:
|
||
|
// Success = green
|
||
|
// Warning = orange
|
||
|
// Danger = red
|
||
|
// Info = blue
|
||
|
public enum AlertMessageType
|
||
|
{
|
||
|
Success,
|
||
|
Warning,
|
||
|
Danger,
|
||
|
Info
|
||
|
}
|
||
|
|
||
|
[JsonConverter(typeof(StringEnumConverter))]
|
||
|
public AlertMessageType Type;
|
||
|
|
||
|
// The translated message to be shown to the user
|
||
|
public string Message;
|
||
|
|
||
|
public AlertMessage()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
public AlertMessage(AlertMessageType type, string message)
|
||
|
{
|
||
|
this.Type = type;
|
||
|
this.Message = message;
|
||
|
}
|
||
|
}
|