master
parent
2c19a574b5
commit
22ecdd32e1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,69 @@
|
||||
@page "/add"
|
||||
|
||||
<h3>Add</h3>
|
||||
|
||||
<EditForm Model="@itemModel" OnValidSubmit="@HandleValidSubmit">
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary />
|
||||
|
||||
<p>
|
||||
<label for="display-name">
|
||||
Display name:
|
||||
<InputText id="display-name" @bind-Value="itemModel.DisplayName" />
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="name">
|
||||
Name:
|
||||
<InputText id="name" @bind-Value="itemModel.Name" />
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="stack-size">
|
||||
Stack size:
|
||||
<InputNumber id="stack-size" @bind-Value="itemModel.StackSize" />
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="max-durability">
|
||||
Max durability:
|
||||
<InputNumber id="max-durability" @bind-Value="itemModel.MaxDurability" />
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
Enchant categories:
|
||||
<div>
|
||||
@foreach (var item in enchantCategories)
|
||||
{
|
||||
<label>
|
||||
<input type="checkbox" @onchange="@(e => OnEnchantCategoriesChange(item, e.Value))" />@item
|
||||
</label>
|
||||
}
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
Repair with:
|
||||
<div>
|
||||
@foreach (var item in repairWith)
|
||||
{
|
||||
<label>
|
||||
<input type="checkbox" @onchange="@(e => OnRepairWithChange(item, e.Value))" />@item
|
||||
</label>
|
||||
}
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
Item image:
|
||||
<InputFile OnChange="@LoadImage" accept=".png" />
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
Accept Condition:
|
||||
<InputCheckbox @bind-Value="itemModel.AcceptCondition" />
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
</EditForm>
|
@ -0,0 +1,5 @@
|
||||
@page "/edit/{Id:int}"
|
||||
|
||||
<h3>Edit</h3>
|
||||
|
||||
<div>My paremeter: @Id</div>
|
@ -1,11 +1,50 @@
|
||||
@page "/List"
|
||||
|
||||
<h2>List</h2>
|
||||
<h3>List</h3>
|
||||
|
||||
@if (items != null)
|
||||
{
|
||||
foreach (var item in items)
|
||||
{
|
||||
<div>@item.Id</div>
|
||||
}
|
||||
}
|
||||
<div>
|
||||
<NavLink class="btn btn-primary" href="Add" Match="NavLinkMatch.All">
|
||||
<i class="fa fa-plus"></i> Ajouter
|
||||
</NavLink>
|
||||
</div>
|
||||
|
||||
<DataGrid TItem="Item"
|
||||
Data="@items"
|
||||
ReadData="@OnReadData"
|
||||
TotalItems="@totalItem"
|
||||
PageSize="10"
|
||||
ShowPager
|
||||
Responsive>
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="#" />
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="Image">
|
||||
<DisplayTemplate>
|
||||
@if (File.Exists($"{WebHostEnvironment.WebRootPath}/images/{context.Name}.png"))
|
||||
{
|
||||
<img src="images/@(context.Name).png" class="img-thumbnail" title="@context.DisplayName" alt="@context.DisplayName" style="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" />
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.StackSize)" Caption="Stack size" />
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.MaxDurability)" Caption="Maximum durability" />
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.EnchantCategories)" Caption="Enchant categories">
|
||||
<DisplayTemplate>
|
||||
@(string.Join(", ", ((Item)context).EnchantCategories))
|
||||
</DisplayTemplate>
|
||||
</DataGridColumn>
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.RepairWith)" Caption="Repair with">
|
||||
<DisplayTemplate>
|
||||
@(string.Join(", ", ((Item)context).RepairWith))
|
||||
</DisplayTemplate>
|
||||
</DataGridColumn>
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.CreatedDate)" Caption="Created date" DisplayFormat="{0:d}" DisplayFormatProvider="@System.Globalization.CultureInfo.GetCultureInfo("fr-FR")" />
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="Action">
|
||||
<DisplayTemplate>
|
||||
<a href="Edit/@(context.Id)" class="btn btn-primary"><i class="fa fa-edit"></i> Editer</a>
|
||||
</DisplayTemplate>
|
||||
</DataGridColumn>
|
||||
</DataGrid>
|
@ -0,0 +1,13 @@
|
||||
@page "/RouteParameter/{text?}"
|
||||
|
||||
<h1>Blazor is @Text!</h1>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public string? Text { get; set; }
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
Text = Text ?? "fantastic";
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<Import Project="$(NuGetPackageRoot)microsoft.aspnetcore.components.analyzers\6.0.9\buildTransitive\netstandard2.0\Microsoft.AspNetCore.Components.Analyzers.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.aspnetcore.components.analyzers\6.0.9\buildTransitive\netstandard2.0\Microsoft.AspNetCore.Components.Analyzers.targets')" />
|
||||
</ImportGroup>
|
||||
</Project>
|
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
2eae5b1a109fd35eb19cf9420d0281c4b3cbb61d
|
||||
c0feac9b06aeb07d0970069a084861810e18935f
|
||||
|
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -1,8 +1,28 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "+WGPLxT6w2s3Dg0Zj9S6lZmyhVPaAGRAn1YV1mxilVt4HYzxclX7UEgrCPPQL//glRztkWsBStFOC1i/AYvAyg==",
|
||||
"dgSpecHash": "W/1RkHWui7njzuhcVzHK0Af2S2YG/2t3peTwrz3Fxjcn4SImRVMhfS8pLj5D0np7Pye7WAPCgstn+wOIbp7How==",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Users\\babaverel\\Source\\Repos\\Blazor\\BlazorApp1\\BlazorApp1.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"expectedPackageFiles": [
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\blazored.localstorage\\4.2.0\\blazored.localstorage.4.2.0.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\blazorise\\1.1.2\\blazorise.1.1.2.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\blazorise.bootstrap\\1.1.2\\blazorise.bootstrap.1.1.2.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\blazorise.datagrid\\1.1.2\\blazorise.datagrid.1.1.2.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\blazorise.icons.fontawesome\\1.1.2\\blazorise.icons.fontawesome.1.1.2.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\microsoft.aspnetcore.authorization\\6.0.9\\microsoft.aspnetcore.authorization.6.0.9.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\microsoft.aspnetcore.components\\6.0.9\\microsoft.aspnetcore.components.6.0.9.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\microsoft.aspnetcore.components.analyzers\\6.0.9\\microsoft.aspnetcore.components.analyzers.6.0.9.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\microsoft.aspnetcore.components.forms\\6.0.9\\microsoft.aspnetcore.components.forms.6.0.9.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\microsoft.aspnetcore.components.web\\6.0.9\\microsoft.aspnetcore.components.web.6.0.9.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\microsoft.aspnetcore.metadata\\6.0.9\\microsoft.aspnetcore.metadata.6.0.9.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\6.0.0\\microsoft.extensions.dependencyinjection.6.0.0.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\6.0.0\\microsoft.extensions.dependencyinjection.abstractions.6.0.0.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\6.0.2\\microsoft.extensions.logging.abstractions.6.0.2.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\microsoft.extensions.options\\6.0.0\\microsoft.extensions.options.6.0.0.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\microsoft.extensions.primitives\\6.0.0\\microsoft.extensions.primitives.6.0.0.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\microsoft.jsinterop\\6.0.9\\microsoft.jsinterop.6.0.9.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\system.io.pipelines\\6.0.3\\system.io.pipelines.6.0.3.nupkg.sha512",
|
||||
"C:\\Users\\babaverel\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\6.0.0\\system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
|
||||
],
|
||||
"logs": []
|
||||
}
|
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 6.9 KiB |
Loading…
Reference in new issue