43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
@using JSMR.Application.Tags.Queries.Search.Contracts
|
|
@using JSMR.Application.VoiceWorks.Queries.Search
|
|
@using JSMR.UI.Blazor.Enums
|
|
@using JSMR.UI.Blazor.Filters
|
|
@using JSMR.UI.Blazor.Services
|
|
@using Microsoft.AspNetCore.WebUtilities
|
|
|
|
<Chip Graphic="Graphic.Person" IconVarient="IconVarient.Fill" Color="@GetColor()" Varient="ElementVarient.Outlined" Tone="@GetTone()" Url="@GetUrl()" Target="_blank">@Creator.Name</Chip>
|
|
|
|
@code {
|
|
[Parameter]
|
|
public required VoiceWorkCreatorItem Creator { get; set; }
|
|
|
|
private string GetUrl()
|
|
{
|
|
return $"https://www.dlsite.com/maniax/fsr/=/keyword_creater/{Creator.Name}";
|
|
}
|
|
|
|
private ColorVarient GetColor()
|
|
{
|
|
if (Creator.IsFavorite)
|
|
{
|
|
return ColorVarient.Mint;
|
|
}
|
|
|
|
if (Creator.IsBlacklisted)
|
|
{
|
|
return ColorVarient.Pink;
|
|
}
|
|
|
|
return ColorVarient.Secondary;
|
|
}
|
|
|
|
private ToneVarient GetTone()
|
|
{
|
|
if (Creator.IsFavorite || Creator.IsBlacklisted)
|
|
{
|
|
return ToneVarient.Tint;
|
|
}
|
|
|
|
return ToneVarient.None;
|
|
}
|
|
} |