35 lines
1.6 KiB
C#
35 lines
1.6 KiB
C#
using Dalamud.Interface;
|
|
using LightlessSync.LightlessConfiguration.Models;
|
|
using System.Numerics;
|
|
namespace LightlessSync.UI.Models;
|
|
public class LightlessNotification
|
|
{
|
|
public string Id { get; set; } = Guid.NewGuid().ToString();
|
|
public string Title { get; set; } = string.Empty;
|
|
public string Message { get; set; } = string.Empty;
|
|
public NotificationType Type { get; set; } = NotificationType.Info;
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
public TimeSpan Duration { get; set; } = TimeSpan.FromSeconds(5);
|
|
public bool IsExpired => DateTime.UtcNow - CreatedAt > Duration;
|
|
public bool IsDismissed { get; set; } = false;
|
|
public List<LightlessNotificationAction> Actions { get; set; } = new();
|
|
public bool ShowProgress { get; set; } = false;
|
|
public float Progress { get; set; } = 0f;
|
|
public bool IsMinimized { get; set; } = false;
|
|
public float AnimationProgress { get; set; } = 0f;
|
|
public bool IsAnimatingIn { get; set; } = true;
|
|
public bool IsAnimatingOut { get; set; } = false;
|
|
|
|
// Sound properties
|
|
public uint? SoundEffectId { get; set; } = null;
|
|
}
|
|
public class LightlessNotificationAction
|
|
{
|
|
public string Id { get; set; } = Guid.NewGuid().ToString();
|
|
public string Label { get; set; } = string.Empty;
|
|
public FontAwesomeIcon Icon { get; set; } = FontAwesomeIcon.None;
|
|
public Vector4 Color { get; set; } = Vector4.One;
|
|
public Action<LightlessNotification> OnClick { get; set; } = _ => { };
|
|
public bool IsPrimary { get; set; } = false;
|
|
public bool IsDestructive { get; set; } = false;
|
|
} |