parent
afef7a2cec
commit
023fad9b5e
@ -0,0 +1,32 @@
|
|||||||
|
<CascadingValue Value="@this">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6">
|
||||||
|
|
||||||
|
<div>Available items:</div>
|
||||||
|
<div>
|
||||||
|
<div class="css-grid">
|
||||||
|
|
||||||
|
@foreach (var item in Items)
|
||||||
|
{
|
||||||
|
<grid>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<img src="data:image/png;base64, @(item.ImageBase64)" class="img-thumbnail" title="@item.DisplayName" alt="@item.DisplayName" style="min-width: 50px; max-width: 50px"/>
|
||||||
|
</td>
|
||||||
|
<td class="txt">
|
||||||
|
@item.DisplayName
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</grid>
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</CascadingValue>
|
@ -1,42 +1,75 @@
|
|||||||
@page "/inventory"
|
@page "/inventory"
|
||||||
@using BlazorApp.Components;
|
@using BlazorApp.Components;
|
||||||
|
@using BlazorApp.Pages;
|
||||||
|
@using BlazorApp.Models;
|
||||||
|
|
||||||
|
<div class="inventory">
|
||||||
|
<h3>Inventory</h3>
|
||||||
|
|
||||||
<h3>Inventory</h3>
|
<div class="css-grid">
|
||||||
|
|
||||||
|
<CraftingItem Index="0" />
|
||||||
<div class="css-grid">
|
<CraftingItem Index="1" />
|
||||||
<CraftingItem Index="0" />
|
<CraftingItem Index="2" />
|
||||||
<CraftingItem Index="1" />
|
<CraftingItem Index="3" />
|
||||||
<CraftingItem Index="2" />
|
<CraftingItem Index="4" />
|
||||||
<CraftingItem Index="3" />
|
<CraftingItem Index="5" />
|
||||||
<CraftingItem Index="4" />
|
<CraftingItem Index="6" />
|
||||||
<CraftingItem Index="5" />
|
<CraftingItem Index="7" />
|
||||||
<CraftingItem Index="6" />
|
<CraftingItem Index="8" />
|
||||||
<CraftingItem Index="7" />
|
<CraftingItem Index="9" />
|
||||||
<CraftingItem Index="8" />
|
<CraftingItem Index="10" />
|
||||||
<CraftingItem Index="9" />
|
<CraftingItem Index="11" />
|
||||||
<CraftingItem Index="10" />
|
<CraftingItem Index="12" />
|
||||||
<CraftingItem Index="11" />
|
<CraftingItem Index="13" />
|
||||||
<CraftingItem Index="12" />
|
<CraftingItem Index="14" />
|
||||||
<CraftingItem Index="13" />
|
<CraftingItem Index="15" />
|
||||||
<CraftingItem Index="14" />
|
<CraftingItem Index="16" />
|
||||||
<CraftingItem Index="15" />
|
<CraftingItem Index="17" />
|
||||||
<CraftingItem Index="16" />
|
<!--
|
||||||
<CraftingItem Index="17" />
|
<CraftingItem Index="18" />
|
||||||
<!--
|
<CraftingItem Index="19" />
|
||||||
<CraftingItem Index="18" />
|
<CraftingItem Index="20" />
|
||||||
<CraftingItem Index="19" />
|
<CraftingItem Index="21" />
|
||||||
<CraftingItem Index="20" />
|
<CraftingItem Index="22" />
|
||||||
<CraftingItem Index="21" />
|
<CraftingItem Index="23" />
|
||||||
<CraftingItem Index="22" />
|
<CraftingItem Index="24" />
|
||||||
<CraftingItem Index="23" />
|
<CraftingItem Index="25" />
|
||||||
<CraftingItem Index="24" />
|
<CraftingItem Index="26" />
|
||||||
<CraftingItem Index="25" />
|
-->
|
||||||
<CraftingItem Index="26" />
|
</div>
|
||||||
-->
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="available-items">
|
||||||
|
|
||||||
|
<div class="search-container">
|
||||||
|
<form action="/action_page.php">
|
||||||
|
<h3>Available Items</h3>
|
||||||
|
<input type="text" placeholder="Search" name="search"/>
|
||||||
|
<button type="submit"><i class="fa fa-search"></i></button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<DataGrid TItem="Item"
|
||||||
|
Data="@Items"
|
||||||
|
ReadData="@OnReadData"
|
||||||
|
TotalItems="@totalItem"
|
||||||
|
PageSize="10"
|
||||||
|
ShowPager
|
||||||
|
Sortable="true">
|
||||||
|
|
||||||
<div>
|
<button type="submit" @onclick="() => SortByName()"></button>
|
||||||
<AvailableItem Items="Items"/>
|
<DataGridColumn TItem="Item" Field="@nameof(Item.Id)">
|
||||||
|
<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: 50px" />
|
||||||
|
}
|
||||||
|
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)"/>
|
||||||
|
</DataGrid>
|
||||||
</div>
|
</div>
|
Loading…
Reference in new issue