Refactoring, database structure changed

This commit is contained in:
2025-03-03 00:56:32 +01:00
Unverified
parent d3805ef3db
commit c603c41c0b
913 changed files with 21764 additions and 32775 deletions

View File

@@ -0,0 +1,47 @@
using System.ComponentModel;
using System.Reflection;
using Microsoft.AspNetCore.Components;
namespace WatchIt.Website.Components.Subcomponents.Common;
public partial class Loading : Component
{
#region PARAMETERS
[Parameter] public Colors Color { get; set; } = Colors.Dark;
#endregion
#region PRIVATE METHODS
private string GetColor()
{
DescriptionAttribute? attribute = Color.GetType()
.GetTypeInfo()
.GetMember(Color.ToString())
.FirstOrDefault(member => member.MemberType == MemberTypes.Field)!
.GetCustomAttributes(typeof(DescriptionAttribute), false)
.SingleOrDefault()
as DescriptionAttribute;
return attribute!.Description;
}
#endregion
#region ENUMS
public enum Colors
{
[Description("dark")]
Dark,
[Description("light")]
Light,
}
#endregion
}