added notification system for file downloads and pair requests
This commit is contained in:
34
LightlessSync/UI/Models/LightlessNotification.cs
Normal file
34
LightlessSync/UI/Models/LightlessNotification.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
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;
|
||||
|
||||
// Animation properties
|
||||
public float AnimationProgress { get; set; } = 0f;
|
||||
public bool IsAnimatingIn { get; set; } = true;
|
||||
public bool IsAnimatingOut { get; set; } = false;
|
||||
}
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user