You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.2 KiB
37 lines
1.2 KiB
@page "/invetaire"
|
|
@using System.Globalization
|
|
@using ValblazeProject.Components
|
|
@using ValblazeProject.Models
|
|
|
|
<h3>inventaire</h3>
|
|
|
|
|
|
<div>
|
|
@for(int i=0; i<10; i++){
|
|
<CraftingItem Index="i"/>
|
|
}
|
|
</div>
|
|
|
|
<div>
|
|
<DataGrid TItem="Item"
|
|
Data="@items"
|
|
ReadData="@OnReadData"
|
|
TotalItems="@totalItem"
|
|
PageSize="10"
|
|
ShowPager
|
|
Responsive>
|
|
<DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="Image">
|
|
<DisplayTemplate>
|
|
@if (!string.IsNullOrWhiteSpace(context.ImageBase64))
|
|
{
|
|
<img src="data:image/png;base64, @(context.ImageBase64)" class="img-thumbnail" title="@context.DisplayName" alt="@context.DisplayName" style="min-width: 50px; max-width: 150px" />
|
|
}
|
|
else
|
|
{
|
|
<img src="images/default.png" class="img-thumbnail" title="@context.DisplayName" alt="@context.DisplayName" style="max-width: 150px" />
|
|
}
|
|
</DisplayTemplate>
|
|
</DataGridColumn>
|
|
<DataGridColumn TItem="Item" Field="@nameof(Item.DisplayName)" Caption="Display name" />
|
|
</DataGrid>
|
|
</div> |