changement et ajouts des thumb pour chargement plus rapide

This commit is contained in:
2026-08-01 18:32:38 +02:00
parent 25edd4fac7
commit 470f60ed04
4 changed files with 24 additions and 16 deletions
@@ -25,17 +25,18 @@
<MudGrid Justify="Justify.Center" Spacing="3">
@for (int index = 0; index < Images.Count; index++)
{
var img = Images[index];
var img = ListImages[index];
<MudItem xs="12" sm="6" md="4" lg="3" xl="2">
<MudPaper Class="image-card pa-2 position-relative" Elevation="2">
<MudImage Src="@img"
<MudImage Src="@img.Thumb"
Alt="Photo sélection"
Class="gallery-thumb"
Fluid="true"
@onclick="() => OpenModalZoom(img)" />
loading="lazy"
@onclick="() => OpenModalZoom(img.PhotoPath)" />
</MudPaper>
</MudItem>
}
@@ -69,6 +70,7 @@
// Liste des images disponibles
private List<string> Images = new();
private List<PhotoUnit> ListImages = new();
public string Title { get; set; }
bool IsModalZoomOpen = false;
@@ -135,7 +137,10 @@
ShootingId = id;
Images = ShootingDb.LireContenu(ShootingId, true);
foreach (var img in Images)
{
ListImages.Add(new PhotoUnit(img));
}
}
}