ajout d'un premier test pour l'affichage des jeux
All checks were successful
Generation data pour merge sur master / reviewProcess (pull_request) Successful in 3m10s
Generation data pour merge sur master / generateData (pull_request) Successful in 1m41s
Generation data pour merge sur master / reviewProcess (push) Successful in 2m0s

This commit was merged in pull request #23.
This commit is contained in:
2024-09-10 22:56:32 +02:00
parent 0cde51e01c
commit 16275e3cd5
12 changed files with 427 additions and 24 deletions

View File

@@ -0,0 +1,10 @@
@using LudikZone.model
<MudPaper Height="140px" Width="140px">
@Game.Name
</MudPaper>
@code {
[Parameter]
public required Game Game { get; set; }
}

View File

@@ -1,28 +1,31 @@
@page "/games"
@using LudikZoneBlazor.Components.Games
@using LudikZoneBlazor.Data
@using Microsoft.AspNetCore.Authorization
@using LudikZoneBlazor.Data.Model
@attribute [Authorize]
@using LudikZone.model
@inject IStringLocalizer<Games> localizer
@inject ApplicationDbContext context
<PageTitle>@localizer["Games"]</PageTitle>
<MudText Typo="Typo.h3" GutterBottom="true">@localizer["Game list"]</MudText>
<AuthorizeView>
<MudGrid Spacing="10" Justify="Justify.Center">
@foreach (var g in GetGames())
{
<MudItem>
<GameIcon Game=@g />
</MudItem>
}
</AuthorizeView>
</MudGrid>
@code {
private List<Game> GetGames()
{
return new List<Game>();
return context.Games.ToList();
}
}
}