@@ -1,34 +0,0 @@
|
||||
using System;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Mail.ViewModels.Data
|
||||
{
|
||||
public partial class AccountProviderDetailViewModel : ObservableObject, IAccountProviderDetailViewModel
|
||||
{
|
||||
|
||||
[ObservableProperty]
|
||||
private MailAccount account;
|
||||
|
||||
public IProviderDetail ProviderDetail { get; set; }
|
||||
|
||||
public Guid StartupEntityId => Account.Id;
|
||||
|
||||
public string StartupEntityTitle => Account.Name;
|
||||
|
||||
public int Order => Account.Order;
|
||||
|
||||
public string StartupEntityAddresses => Account.Address;
|
||||
|
||||
public int HoldingAccountCount => 1;
|
||||
|
||||
public bool HasProfilePicture => !string.IsNullOrEmpty(Account.Base64ProfilePictureData);
|
||||
|
||||
public AccountProviderDetailViewModel(IProviderDetail providerDetail, MailAccount account)
|
||||
{
|
||||
ProviderDetail = providerDetail;
|
||||
Account = account;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace Wino.Mail.ViewModels.Data
|
||||
{
|
||||
public class AppColorViewModel : ObservableObject
|
||||
{
|
||||
private string _hex;
|
||||
|
||||
public string Hex
|
||||
{
|
||||
get => _hex;
|
||||
set => SetProperty(ref _hex, value);
|
||||
}
|
||||
|
||||
public bool IsAccentColor { get; }
|
||||
|
||||
public AppColorViewModel(string hex, bool isAccentColor = false)
|
||||
{
|
||||
IsAccentColor = isAccentColor;
|
||||
Hex = hex;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Wino.Messaging.Client.Navigation;
|
||||
|
||||
namespace Wino.Mail.ViewModels.Data
|
||||
{
|
||||
public partial class BreadcrumbNavigationItemViewModel : ObservableObject
|
||||
{
|
||||
[ObservableProperty]
|
||||
private string title;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool isActive;
|
||||
|
||||
public BreadcrumbNavigationRequested Request { get; set; }
|
||||
|
||||
public BreadcrumbNavigationItemViewModel(BreadcrumbNavigationRequested request, bool isActive)
|
||||
{
|
||||
Request = request;
|
||||
Title = request.PageTitle;
|
||||
IsActive = isActive;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Entities.Mail;
|
||||
using Wino.Core.Domain.Entities.Shared;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
|
||||
namespace Wino.Mail.ViewModels.Data
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Mail.ViewModels.Data
|
||||
{
|
||||
public partial class MergedAccountProviderDetailViewModel : ObservableObject, IAccountProviderDetailViewModel
|
||||
{
|
||||
public List<AccountProviderDetailViewModel> HoldingAccounts { get; }
|
||||
public MergedInbox MergedInbox { get; }
|
||||
|
||||
public string AccountAddresses => string.Join(", ", HoldingAccounts.Select(a => a.Account.Address));
|
||||
|
||||
public Guid StartupEntityId => MergedInbox.Id;
|
||||
|
||||
public string StartupEntityTitle => MergedInbox.Name;
|
||||
|
||||
public int Order => 0;
|
||||
|
||||
public IProviderDetail ProviderDetail { get; set; }
|
||||
|
||||
public string StartupEntityAddresses => AccountAddresses;
|
||||
|
||||
public int HoldingAccountCount => HoldingAccounts.Count;
|
||||
|
||||
public MergedAccountProviderDetailViewModel(MergedInbox mergedInbox, List<AccountProviderDetailViewModel> holdingAccounts)
|
||||
{
|
||||
MergedInbox = mergedInbox;
|
||||
HoldingAccounts = holdingAccounts;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,8 @@ using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Entities.Mail;
|
||||
using Wino.Core.Domain.Entities.Shared;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
|
||||
namespace Wino.Mail.ViewModels.Data
|
||||
|
||||
Reference in New Issue
Block a user