Expanding theme tab to customization tab. Started improving theme selection.

This commit is contained in:
2025-07-20 23:27:51 +02:00
parent 03ea94b858
commit 2c9a87bf3e
20 changed files with 1336 additions and 295 deletions

View File

@@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations;
using Moonlight.Shared.Misc;
namespace Moonlight.Shared.Http.Requests.Admin.Sys.Theme;
public class CreateThemeRequest
{
[Required(ErrorMessage = "You need to provide a name")]
public string Name { get; set; }
[Required(ErrorMessage = "You need to provide an author")]
public string Author { get; set; }
[Required(ErrorMessage = "You need to provide a version")]
public string Version { get; set; }
public string? UpdateUrl { get; set; }
public string? DonateUrl { get; set; }
public ApplicationTheme Content { get; set; }
}

View File

@@ -0,0 +1,23 @@
using System.ComponentModel.DataAnnotations;
using Moonlight.Shared.Misc;
namespace Moonlight.Shared.Http.Requests.Admin.Sys.Theme;
public class UpdateThemeRequest
{
public bool IsEnabled { get; set; }
[Required(ErrorMessage = "You need to provide a name")]
public string Name { get; set; }
[Required(ErrorMessage = "You need to provide an author")]
public string Author { get; set; }
[Required(ErrorMessage = "You need to provide a version")]
public string Version { get; set; }
public string? UpdateUrl { get; set; }
public string? DonateUrl { get; set; }
public ApplicationTheme Content { get; set; }
}

View File

@@ -1,9 +0,0 @@
using System.ComponentModel.DataAnnotations;
namespace Moonlight.Shared.Http.Requests.Admin.Sys;
public class UpdateThemeRequest
{
[Required(ErrorMessage = "You need to provide Variables")]
public Dictionary<string, string> Variables { get; set; }
}

View File

@@ -0,0 +1,19 @@
using Moonlight.Shared.Misc;
namespace Moonlight.Shared.Http.Responses.Admin;
public class ThemeResponse
{
public int Id { get; set; }
public bool IsEnabled { get; set; }
public string Name { get; set; }
public string Author { get; set; }
public string Version { get; set; }
public string? UpdateUrl { get; set; }
public string? DonateUrl { get; set; }
public ApplicationTheme Content { get; set; }
}

View File

@@ -0,0 +1,49 @@
namespace Moonlight.Shared.Misc;
public class ApplicationTheme
{
public string ColorBackground { get; set; }
public string ColorBase100 { get; set; }
public string ColorBase150 { get; set; }
public string ColorBase200 { get; set; }
public string ColorBase250 { get; set; }
public string ColorBase300 { get; set; }
public string ColorBaseContent { get; set; }
public string ColorPrimary { get; set; }
public string ColorPrimaryContent { get; set; }
public string ColorSecondary { get; set; }
public string ColorSecondaryContent { get; set; }
public string ColorAccent { get; set; }
public string ColorAccentContent { get; set; }
public string ColorNeutral { get; set; }
public string ColorNeutralContent { get; set; }
public string ColorInfo { get; set; }
public string ColorInfoContent { get; set; }
public string ColorSuccess { get; set; }
public string ColorSuccessContent { get; set; }
public string ColorWarning { get; set; }
public string ColorWarningContent { get; set; }
public string ColorError { get; set; }
public string ColorErrorContent { get; set; }
public float RadiusSelector { get; set; }
public float RadiusField { get; set; }
public float RadiusBox { get; set; }
public float SizeSelector { get; set; }
public float SizeField { get; set; }
public float Border { get; set; }
public float Depth { get; set; }
public float Noise { get; set; }
}