Add mail categories support
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Models.Accounts;
|
||||
|
||||
public class UnreadCategoryCountResult
|
||||
{
|
||||
public Guid CategoryId { get; set; }
|
||||
public Guid AccountId { get; set; }
|
||||
public int UnreadItemCount { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace Wino.Core.Domain.Models.MailItem;
|
||||
|
||||
public sealed record MailCategoryColorOption(string BackgroundColorHex, string TextColorHex);
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace Wino.Core.Domain.Models.MailItem;
|
||||
|
||||
public sealed record MailCategoryDialogResult(string Name, string BackgroundColorHex, string TextColorHex);
|
||||
@@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wino.Core.Domain.Models.MailItem;
|
||||
|
||||
public static class MailCategoryPalette
|
||||
{
|
||||
public static IReadOnlyList<MailCategoryColorOption> DefaultOptions { get; } =
|
||||
[
|
||||
new("#FEE2E2", "#991B1B"),
|
||||
new("#FECACA", "#7F1D1D"),
|
||||
new("#FFEDD5", "#9A3412"),
|
||||
new("#FED7AA", "#7C2D12"),
|
||||
new("#FEF3C7", "#92400E"),
|
||||
new("#FDE68A", "#78350F"),
|
||||
new("#ECFCCB", "#3F6212"),
|
||||
new("#D9F99D", "#365314"),
|
||||
new("#DCFCE7", "#166534"),
|
||||
new("#BBF7D0", "#14532D"),
|
||||
new("#CCFBF1", "#115E59"),
|
||||
new("#99F6E4", "#134E4A"),
|
||||
new("#CFFAFE", "#155E75"),
|
||||
new("#A5F3FC", "#164E63"),
|
||||
new("#DBEAFE", "#1D4ED8"),
|
||||
new("#BFDBFE", "#1E3A8A"),
|
||||
new("#E0E7FF", "#4338CA"),
|
||||
new("#DDD6FE", "#5B21B6"),
|
||||
new("#F3E8FF", "#7E22CE"),
|
||||
new("#FCE7F3", "#9D174D")
|
||||
];
|
||||
}
|
||||
@@ -9,4 +9,5 @@ public record NewMailItemPackage(
|
||||
MailCopy Copy,
|
||||
MimeMessage Mime,
|
||||
string AssignedRemoteFolderId,
|
||||
IReadOnlyList<AccountContact> ExtractedContacts = null);
|
||||
IReadOnlyList<AccountContact> ExtractedContacts = null,
|
||||
IReadOnlyList<string> CategoryNames = null);
|
||||
|
||||
@@ -17,4 +17,8 @@ public record MailListInitializationOptions(IEnumerable<IMailItemFolder> Folders
|
||||
List<MailCopy> PreFetchMailCopies = null,
|
||||
bool DeduplicateByServerId = false,
|
||||
int Skip = 0,
|
||||
int Take = 0);
|
||||
int Take = 0)
|
||||
{
|
||||
public IReadOnlyList<Guid> CategoryIds { get; init; }
|
||||
public bool IsCategoryView => CategoryIds?.Count > 0;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,10 @@ public abstract record CalendarRequestBase(CalendarItem Item) : RequestBase<Cale
|
||||
public virtual Guid? LocalCalendarItemId => Item?.Id;
|
||||
}
|
||||
|
||||
public abstract record CategoryRequestBase(Guid AccountId) : RequestBase<CategorySynchronizerOperation>, ICategoryActionRequest
|
||||
{
|
||||
}
|
||||
|
||||
public class BatchCollection<TRequestType> : List<TRequestType>, IUIChangeRequest where TRequestType : IUIChangeRequest
|
||||
{
|
||||
public BatchCollection(IEnumerable<TRequestType> collection) : base(collection)
|
||||
|
||||
@@ -170,6 +170,7 @@ public static class SettingsNavigationInfoProvider
|
||||
WinoPage.AccountDetailsPage => WinoPage.ManageAccountsPage,
|
||||
WinoPage.MergedAccountDetailsPage => WinoPage.ManageAccountsPage,
|
||||
WinoPage.AliasManagementPage => WinoPage.ManageAccountsPage,
|
||||
WinoPage.MailCategoryManagementPage => WinoPage.ManageAccountsPage,
|
||||
WinoPage.SignatureManagementPage => WinoPage.ManageAccountsPage,
|
||||
WinoPage.ImapCalDavSettingsPage => WinoPage.ManageAccountsPage,
|
||||
WinoPage.CreateEmailTemplatePage => WinoPage.EmailTemplatesPage,
|
||||
|
||||
Reference in New Issue
Block a user