From 3f2567803c1b1ee1cac84ff04e0bb4ac710c6fb9 Mon Sep 17 00:00:00 2001 From: MasterDraco Date: Wed, 12 Mar 2025 22:04:48 +0000 Subject: [PATCH] Add LogEntry and UserPreferences classes to LoggingService --- src/Services/LoggingService.cs | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/Services/LoggingService.cs b/src/Services/LoggingService.cs index abb606c..b9c8ad7 100644 --- a/src/Services/LoggingService.cs +++ b/src/Services/LoggingService.cs @@ -6,10 +6,38 @@ using System.Text; using System.Text.Json; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using TransmissionRssManager.Core; namespace TransmissionRssManager.Services { + public class LogEntry + { + public int Id { get; set; } + public DateTime Timestamp { get; set; } + public string Level { get; set; } = string.Empty; + public string Message { get; set; } = string.Empty; + public string Context { get; set; } = string.Empty; + public string Properties { get; set; } = string.Empty; + } + + public class UserPreferences + { + public bool EnableDarkMode { get; set; } = false; + public bool AutoRefreshUIEnabled { get; set; } = true; + public int AutoRefreshIntervalSeconds { get; set; } = 30; + public bool NotificationsEnabled { get; set; } = true; + public List NotificationEvents { get; set; } = new List + { + "torrent-added", + "torrent-completed", + "torrent-error" + }; + public string DefaultView { get; set; } = "dashboard"; + public bool ConfirmBeforeDelete { get; set; } = true; + public int MaxItemsPerPage { get; set; } = 25; + public string DateTimeFormat { get; set; } = "yyyy-MM-dd HH:mm:ss"; + public bool ShowCompletedTorrents { get; set; } = true; + public int KeepHistoryDays { get; set; } = 30; + } public interface ILoggingService { void Configure(UserPreferences preferences);