Update Project

pull/9/head
Louis DUFOUR 2 years ago
parent f5fe306085
commit 7163dcde1a

@ -1,28 +0,0 @@
@page "/example-tab-set"
<TabSet>
<Tab Title="First tab">
<h4>Greetings from the first tab!</h4>
<label>
<input type="checkbox" @bind="showThirdTab" />
Toggle third tab
</label>
</Tab>
<Tab Title="Second tab">
<h4>Hello from the second tab!</h4>
</Tab>
@if (showThirdTab)
{
<Tab Title="Third tab">
<h4>Welcome to the disappearing third tab!</h4>
<p>Toggle this tab from the first tab.</p>
</Tab>
}
</TabSet>
@code {
private bool showThirdTab;
}

@ -17,7 +17,7 @@
<label class="mt-2">Actions</label>
<div class="actions" id="actions"></div>
</div>
<div class="maList">
<div class="toolSearch">
<label>
@ -30,6 +30,8 @@
</label>
</div>
<DataGrid TItem="Item"
Data="@items"
ReadData="@OnReadData"
@ -38,11 +40,25 @@
@ref="dataGrid"
ShowPager
Responsive>
<DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="">
<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" />
<div
ondragover="event.preventDefault();"
draggable="true"
@ondragstart="@OnDragStart"
@ondrop="@OnDrop"
@ondragenter="@OnDragEnter"
@ondragleave="@OnDragLeave">
@if (context != null)
{
//<img src="data:image/png;base64, @(Item.ImageBase64)" class="img-thumbnail" title="@Item.DisplayName" alt="@Item.DisplayName" style="min-width: 50px; max-width: 100px" />
<img src="data:image/png;base64, @(context.ImageBase64)" class="img-thumbnail" title="@context.DisplayName" alt="@context.DisplayName" style="min-width: 50px; max-width: 50px" />
}
</div>
//<img src="data:image/png;base64, @(context.ImageBase64)" class="img-thumbnail" title="@context.DisplayName" alt="@context.DisplayName" style="min-width: 50px; max-width: 50px" />
//<label>@context.DisplayName</label>
}
else
@ -51,7 +67,7 @@
}
</DisplayTemplate>
</DataGridColumn>
<DataGridColumn TItem="Item" Field="@nameof(Item.DisplayName)" Caption="" />
<DataGridColumn TItem="Item" Field="@nameof(Item.DisplayName)"/>
</DataGrid>
</div>
</main>

@ -41,9 +41,6 @@ namespace ValblazeProject.Pages
[Inject]
internal IJSRuntime JavaScriptRuntime { get; set; }
private List<CraftingRecipe> Recipes { get; set; } = new List<CraftingRecipe>();
[CascadingParameter]
public IModalService Modal { get; set; }
@ -67,6 +64,13 @@ namespace ValblazeProject.Pages
JavaScriptRuntime.InvokeVoidAsync("Inventaire.AddActions", e.NewItems);
}
// Drag
internal void OnDragEnter() { }
internal void OnDragStart() { }
internal void OnDrop() { }
internal void OnDragLeave() { }
/******************* Attribut modifier *******************/
private string search
{
@ -159,7 +163,7 @@ namespace ValblazeProject.Pages
}
}
private async void OnDelete(int id)
/* private async void OnDelete(int id)
{
var parameters = new ModalParameters();
parameters.Add(nameof(Item.Id), id);
@ -176,6 +180,6 @@ namespace ValblazeProject.Pages
// Reload the page
NavigationManager.NavigateTo("list", true);
}
}*/
}
}

Loading…
Cancel
Save