mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-04 09:58:13 +01:00
* Allow disabling notifications per user and disabling specific notifications per use closes #1974 * Add disable notifs for all users * fix term generator for notifications * sow checkboxes instead of multiselect when js is enabled * remove js dependency * fix notif conditions
27 lines
771 B
C#
27 lines
771 B
C#
using System;
|
|
|
|
namespace BTCPayServer.Contracts
|
|
{
|
|
public abstract class BaseNotification
|
|
{
|
|
public abstract string Identifier { get; }
|
|
public abstract string NotificationType { get; }
|
|
}
|
|
|
|
public interface INotificationHandler
|
|
{
|
|
string NotificationType { get; }
|
|
Type NotificationBlobType { get; }
|
|
public (string identifier, string name)[] Meta { get; }
|
|
void FillViewModel(object notification, NotificationViewModel vm);
|
|
}
|
|
|
|
public class NotificationViewModel
|
|
{
|
|
public string Id { get; set; }
|
|
public DateTimeOffset Created { get; set; }
|
|
public string Body { get; set; }
|
|
public string ActionLink { get; set; }
|
|
public bool Seen { get; set; }
|
|
}
|
|
}
|