diff --git a/app/MindWork AI Studio/Components/Supporter.razor b/app/MindWork AI Studio/Components/Supporter.razor new file mode 100644 index 00000000..d1378b6b --- /dev/null +++ b/app/MindWork AI Studio/Components/Supporter.razor @@ -0,0 +1,18 @@ + + @if (string.IsNullOrWhiteSpace(this.URL)) + { + + @this.Name + + } + else + { + + @this.Name + + } + + + @this.Acknowledgment + + \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/Supporter.razor.cs b/app/MindWork AI Studio/Components/Supporter.razor.cs new file mode 100644 index 00000000..c4b9414d --- /dev/null +++ b/app/MindWork AI Studio/Components/Supporter.razor.cs @@ -0,0 +1,26 @@ +using Microsoft.AspNetCore.Components; + +namespace AIStudio.Components; + +public partial class Supporter : ComponentBase +{ + [Parameter] + public string Name { get; set; } = string.Empty; + + [Parameter] + public string Acknowledgment { get; set; } = string.Empty; + + [Parameter] + public string? URL { get; set; } + + [Parameter] + public SupporterType Type { get; set; } + + private string Icon => this.Type switch + { + SupporterType.INDIVIDUAL => Icons.Material.Filled.Person, + SupporterType.ORGANIZATION => Icons.Material.Filled.Business, + + _ => Icons.Material.Filled.Person4, + }; +} \ No newline at end of file diff --git a/app/MindWork AI Studio/Components/SupporterType.cs b/app/MindWork AI Studio/Components/SupporterType.cs new file mode 100644 index 00000000..c2647622 --- /dev/null +++ b/app/MindWork AI Studio/Components/SupporterType.cs @@ -0,0 +1,8 @@ +namespace AIStudio.Components; + +public enum SupporterType +{ + UNKNOWN, + INDIVIDUAL, + ORGANIZATION +} \ No newline at end of file