Initial commit.
This commit is contained in:
29
Wino.Core.Domain/Models/Personalization/AppThemeBase.cs
Normal file
29
Wino.Core.Domain/Models/Personalization/AppThemeBase.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Models.Personalization
|
||||
{
|
||||
/// <summary>
|
||||
/// Base class for all app themes.
|
||||
/// </summary>
|
||||
public abstract class AppThemeBase
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string ThemeName { get; set; }
|
||||
public ApplicationElementTheme ForceElementTheme { get; set; }
|
||||
public string AccentColor { get; set; }
|
||||
public bool IsAccentColorAssigned => !string.IsNullOrEmpty(AccentColor);
|
||||
public string BackgroundPreviewImage => GetBackgroundPreviewImagePath();
|
||||
public abstract AppThemeType AppThemeType { get; }
|
||||
|
||||
protected AppThemeBase(string themeName, Guid id)
|
||||
{
|
||||
ThemeName = themeName;
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public abstract Task<string> GetThemeResourceDictionaryContentAsync();
|
||||
public abstract string GetBackgroundPreviewImagePath();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Models.Personalization
|
||||
{
|
||||
public class CustomThemeMetadata
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string AccentColorHex { get; set; }
|
||||
public bool HasCustomAccentColor => !string.IsNullOrEmpty(AccentColorHex);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Models.Personalization
|
||||
{
|
||||
public class ElementThemeContainer
|
||||
{
|
||||
public ElementThemeContainer(ApplicationElementTheme nativeTheme, string title)
|
||||
{
|
||||
NativeTheme = nativeTheme;
|
||||
Title = title;
|
||||
}
|
||||
|
||||
public ApplicationElementTheme NativeTheme { get; set; }
|
||||
public string Title { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
namespace Wino.Core.Domain.Models.Personalization
|
||||
{
|
||||
public record MailListPaneLengthPreferences(string Title, double Length);
|
||||
}
|
||||
Reference in New Issue
Block a user