feature/apply-filter (#18)
Co-authored-by: Maxime Adler <madler@sqli.com> Reviewed-on: #18
This commit was merged in pull request #18.
This commit is contained in:
@@ -12,19 +12,4 @@ public class GameBase : ComponentBase
|
||||
{
|
||||
NavigationManager.NavigateTo($"/Games/Detail/{GameDto.Id}");
|
||||
}
|
||||
|
||||
protected string GetFormatedStorageSpace()
|
||||
{
|
||||
if (GameDto.StorageSpace == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
return GameDto.StorageSpace switch
|
||||
{
|
||||
>= 1000000 => $"{GameDto.StorageSpace / 1000000:f1} To",
|
||||
>= 1000 => $"{GameDto.StorageSpace / 1000:f1} Go",
|
||||
_ => $"{GameDto.StorageSpace:f1} Mo"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public partial class GameCreationForm
|
||||
[Parameter] public CategoriesDto? Categories { get; set; }
|
||||
[Parameter] public EventCallback OnSubmit { get; set; }
|
||||
|
||||
private GameDto GameDto = new();
|
||||
private GameDetailDto GameDto = new();
|
||||
private EditContext? EditContext;
|
||||
private readonly SelectTheme Theme = SelectTheme.Creation;
|
||||
private readonly SliderParams SliderParams = new() { Gap = 1, Min = 1, Max = 5 };
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
<span class="storage">@GetFormatedStorageSpace()</span>
|
||||
<span class="storage">@GameHelper.GetFormatedStorageSpace(GameDto.StorageSpace)</span>
|
||||
|
||||
<div class="interest">
|
||||
<span class="value" style="@($"color: var({GameHelper.GetInterestColor(GameDto.Interest, 5)})")">
|
||||
|
||||
@@ -4,7 +4,7 @@ using GameIdeas.Shared.Dto;
|
||||
|
||||
namespace GameIdeas.BlazorApp.Pages.Games.Components;
|
||||
|
||||
public class GameValidation : AbstractValidator<GameDto>
|
||||
public class GameValidation : AbstractValidator<GameDetailDto>
|
||||
{
|
||||
public GameValidation()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user