Updated search logic. More UI updates.
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
<div>
|
||||
<label>@IndexInfo</label>
|
||||
</div>
|
||||
<MudPagination ShowFirstButton="true" ShowLastButton="true" Count="@((int)Math.Ceiling((decimal)TotalItems / (decimal)PageSize))" Selected="@PageNumber" SelectedChanged="OnSelectedChanged" />
|
||||
<div>
|
||||
<MudPagination class="pager" ShowFirstButton="true" ShowLastButton="true" Count="@((int)Math.Ceiling((decimal)TotalItems / (decimal)PageSize))" Selected="@PageNumber" SelectedChanged="OnSelectedChanged" />
|
||||
<div class="page-sizes">
|
||||
<MudSelect T="int" Value="PageSize" ValueChanged="OnPageSizeChanged" Dense="true" Variant="Variant.Outlined" Margin="Margin.Dense">
|
||||
@foreach (int value in PageSizes)
|
||||
{
|
||||
|
||||
@@ -7,18 +7,20 @@
|
||||
<JImage OverlayClass="j-voice-work-image-overlay" ImageClass="j-voice-work-image" Source="@ImageUrlProvider.GetImageUrl(Product, "main")"></JImage>
|
||||
</div>
|
||||
<div class="j-voice-work-content">
|
||||
<div class="j-product-title">@Product.ProductName</div>
|
||||
<div class="j-product-title">
|
||||
<a href="@Product.ProductUrl" target="_blank">@Product.ProductName</a>
|
||||
</div>
|
||||
<div class="j-product-contributors">
|
||||
<span class="j-circle">
|
||||
<MudChip T="string"
|
||||
Href="https://github.com/MudBlazor/MudBlazor"
|
||||
Href=@($"https://www.dlsite.com/maniax/circle/profile/=/maker_id/{Product.MakerId}.html")
|
||||
Target="_blank"
|
||||
Variant="Variant.Filled"
|
||||
Icon="@Icons.Material.Outlined.Circle">@Product.Maker</MudChip>
|
||||
@foreach (var creator in Product.Creators)
|
||||
{
|
||||
<MudChip T="string"
|
||||
Href="https://github.com/MudBlazor/MudBlazor"
|
||||
Href=@($"https://www.dlsite.com/maniax/fsr/=/keyword_creater/{creator.Name}")
|
||||
Target="_blank"
|
||||
Variant="Variant.Filled"
|
||||
Icon="@Icons.Material.Filled.Person">@creator.Name</MudChip>
|
||||
@@ -36,7 +38,7 @@
|
||||
<div class="j-voice-work-info">
|
||||
<div class="j-release-date-container">
|
||||
<span class="j-icon j-icon-calendar"></span>
|
||||
<span>@GetSomething(Product)</span>
|
||||
<span>@GetReleaseDateText(Product)</span>
|
||||
</div>
|
||||
<div class="j-wishlist-container">
|
||||
<span class="j-icon j-icon-star j-icon-color-yellow"></span>
|
||||
@@ -49,6 +51,14 @@
|
||||
<span>@((Product.Downloads ?? 0).ToString("n0"))</span>
|
||||
</div>
|
||||
}
|
||||
@* <div class="j-icon-2 j-icon-2-flag-@GetFlagClassSuffix(Product)"></div> *@
|
||||
<div class="j-spacer"></div>
|
||||
@if (Product.HasTrial || Product.HasChobit)
|
||||
{
|
||||
<div class="j-trial-container">
|
||||
<div class="j-icon j-icon-headphones"></div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -56,7 +66,7 @@
|
||||
[Parameter]
|
||||
public required VoiceWorkSearchResult Product { get; set; }
|
||||
|
||||
private string GetSomething(VoiceWorkSearchResult voiceWork)
|
||||
private string GetReleaseDateText(VoiceWorkSearchResult voiceWork)
|
||||
{
|
||||
if (voiceWork.SalesDate.HasValue)
|
||||
{
|
||||
@@ -82,4 +92,19 @@
|
||||
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
private string GetFlagClassSuffix(VoiceWorkSearchResult voiceWork)
|
||||
{
|
||||
switch (voiceWork.SubtitleLanguage)
|
||||
{
|
||||
case 1:
|
||||
return "us";
|
||||
case 2:
|
||||
return "cn";
|
||||
case 3:
|
||||
return "kr";
|
||||
default:
|
||||
return "jp";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user