parent
d3c4ac83ae
commit
fa2ab08281
@ -1,12 +1,8 @@
|
|||||||
<Router AppAssembly="@typeof(App).Assembly">
|
<Router AppAssembly="@typeof(Program).Assembly">
|
||||||
<Found Context="routeData">
|
<Found Context="routeData">
|
||||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
|
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
|
||||||
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
|
||||||
</Found>
|
</Found>
|
||||||
<NotFound>
|
<NotFound>
|
||||||
<PageTitle>Not found</PageTitle>
|
<p>Sorry, there's nothing at this address.</p>
|
||||||
<LayoutView Layout="@typeof(MainLayout)">
|
|
||||||
<p role="alert">Sorry, there's nothing at this address.</p>
|
|
||||||
</LayoutView>
|
|
||||||
</NotFound>
|
</NotFound>
|
||||||
</Router>
|
</Router>
|
||||||
|
@ -0,0 +1,70 @@
|
|||||||
|
@page "/add"
|
||||||
|
@using BlazorApp.Models;
|
||||||
|
|
||||||
|
<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 "/BlazorRoute"
|
||||||
|
@page "/DifferentBlazorRoute"
|
||||||
|
|
||||||
|
<h1>Blazor routing</h1>
|
||||||
|
|
@ -1,28 +1,27 @@
|
|||||||
{
|
{
|
||||||
"iisSettings": {
|
"iisSettings": {
|
||||||
"windowsAuthentication": false,
|
"windowsAuthentication": false,
|
||||||
"anonymousAuthentication": true,
|
"anonymousAuthentication": true,
|
||||||
"iisExpress": {
|
"iisExpress": {
|
||||||
"applicationUrl": "http://localhost:45101",
|
"applicationUrl": "http://localhost:45101",
|
||||||
"sslPort": 44367
|
"sslPort": 44367
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"BlazorApp": {
|
"BlazorApp": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"dotnetRunMessages": true,
|
"launchBrowser": true,
|
||||||
"launchBrowser": true,
|
"applicationUrl": "https://localhost:7204;http://localhost:5204",
|
||||||
"applicationUrl": "https://localhost:7204;http://localhost:5204",
|
"environmentVariables": {
|
||||||
"environmentVariables": {
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
}
|
||||||
}
|
},
|
||||||
},
|
"IIS Express": {
|
||||||
"IIS Express": {
|
"commandName": "IISExpress",
|
||||||
"commandName": "IISExpress",
|
"launchBrowser": true,
|
||||||
"launchBrowser": true,
|
"environmentVariables": {
|
||||||
"environmentVariables": {
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
After Width: | Height: | Size: 164 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 87 KiB |
Loading…
Reference in new issue